DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

Input Non-English Characters on Windows

Open BEN425 opened this issue 6 months ago • 1 comments

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()

BEN425 avatar Jul 12 '25 17:07 BEN425

A duplicate of #1075.

v-ein avatar Jul 12 '25 18:07 v-ein