hoffstadt / hoffstadt/DearPyGui

Input Non-English Characters on Windows

Open
#2,532 2 comments 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## 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

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.