hoffstadt / hoffstadt/DearPyGui

In Japanese operating systems, the normal characters entered cannot still be displayed in the input box.

Open
#2,665 0 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

### Dear PyGui version:

2.3.1

### Python version:

3.10

### Operating system:

windows 11

### My issue/question:

I found that even in the latest DPG 2.3.1, character input still cannot display correctly in the input box due to a system encoding issue, and it instead becomes "?".
This bug was discovered in a user running the Japanese Windows version, where the text could not display correctly when entering Chinese in the input box. Typing Japanese displays normally, and copying Chinese from the paste version into the input box also displays correctly.

### Steps to reproduce:

1. Please set your font file path.
2. run code

### Expected behavior:

Under normal circumstances, it will display the character normally, rather than "?".

### Screenshots:

N/A

Image

Image

### Standalone, minimal, complete and verifiable example:

```python
import dearpygui.dearpygui as dpg
import time
font = 'font_data/HANDotumLVT.ttf'
dpg.create_context()
with dpg.font_registry():
with dpg.font(font, 24, tag='HANDotumLVT.ttf, 24px'):
pass

with dpg.window(label='Main Window', tag='窗口_(1)', width=998, height=705):
dpg.add_input_text(label='输入文字', tag='文本输入框')

dpg.bind_font("HANDotumLVT.ttf, 24px")
dpg.create_viewport(title='main_UI', width=1024, height=760,vsync=False)
dpg.setup_dearpygui()

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```

Contributor guide

Open the contributing guide

Research direction

Start by running the standalone Python example with the specified font on a Japanese Windows 11 system, then compare typing Chinese with pasting it into the input_text widget. Trace the Dear PyGui text-input handling to identify where typed characters become "?"; no source file or test is named. Done means normally typed Chinese displays correctly, with regression coverage for this environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
desktop, internationalization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.