stride3d / stride3d/stride

TextInputEvent.Text encoding for different languages

Open
#1,728 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release

Version: 4.1.0.1838

Platform(s): Windows

Describe the bug
When I enable text input events and try to get them, events text can get wrong encoding with some languages.
I found this bug when testing Cyrillic and Greek characters input, with English, German or Japanese it worked fine.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project with the TextEdit control (this is the simplest way to get and visualize input events).
  2. Install any Cyrillic or Greek keyboard layout
  3. Try to input something into the TextEdit with different languages and see what is displayed in the TextEdit
  4. Compare it with the text typed in the Notepad or any other apps

Expected behavior
Text encoding should've been detected correctly, all languages should be encoded in the same encoding.

Screenshots
Input text difference example

Additional context
I found out that I can get Cyrillic letters back with changing encoding from UTF-16 to Windows-1251. Also Greek letters can be get when changing the encoding from UTF-16 to Windows-1253. However, when changing the encoding, Japanese letters are lost.
Also, when you copy and paste the text into the game, it is handled correctly, letters are the same as copied


So what can I do to keep all languages available for input?

Contributor guide

Open the contributing guide

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.

Research direction

Start with the Windows TextInputEvent handling used by the TextEdit control and reproduce the issue with Cyrillic, Greek, English, German, and Japanese keyboard layouts. Compare the event text with Notepad and verify that UTF-16 preserves every language without language-specific encoding changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.