Input Non-English Characters on Windows

Open
#2,532 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp, python

Research direction

Start with the standalone Python example on Windows 11 and reproduce the issue using Chinese or Japanese input in the multiline text widget; compare direct typing with paste. The payload names no implementation files or tests, so trace the Windows text-input path first. Done means non-English characters display correctly when typed while preserving the existing paste behavior.

Written by the indexing model from the issue text.

Description

state: pending type: bug

Version of Dear PyGui

Version: 2.1.0
Python: 3.11.5
Operating System: Windows 11

My Issue/Question

When inputting non-English characters (such as Chinese, Japanese), the input texts become "?".
But if I copy the texts and paste to the text input, the texts can be shown correctly.

To Reproduce

Steps to reproduce the behavior:

  1. Run the sample code below
  2. Input non-English characters (such as Chinese, Japanese) in the text input

Expected behavior

The texts should be shown correctly.

Screenshots/Video

Try to input chinese characters:
Image

Image

Copy-paste works normally:
Image

Standalone, minimal, complete and verifiable example

import dearpygui.dearpygui as dpg

dpg.create_context()

with dpg.font_registry() :
    with dpg.font("msjh.ttc", 24, tag="def_font"):
        dpg.add_font_range_hint(dpg.mvFontRangeHint_Chinese_Full)
        dpg.add_font_range_hint(dpg.mvFontRangeHint_Japanese)

with dpg.window() :
    dpg.add_text("輸入:")
    dpg.add_input_text(multiline=True)
    dpg.bind_font("def_font")

dpg.create_viewport()
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
Dominant language
C++
Stars
15.7k
Forks
790
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hoffstadt/DearPyGui

All issues in hoffstadt/DearPyGui

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.