DearPyGui
DearPyGui copied to clipboard
Input Non-English Characters on Windows
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:
- Run the sample code below
- 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:
Copy-paste works normally:
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()
A duplicate of #1075.