UTF-16 display #72
Replies: 4 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I thought the WinHex text display for UTF-16 looked a little further spaced apart. I wonder if it treats everything as two-letter width to ensure all characters align still. Presumably, variable width would mean HexCtrl also needed to store a map of each text character width so that it could correctly position the caret and highlighting correctly?
I'm still thinking about this. The only way I can think of so far is that it re-creates the font for each character or when a change is needed. This would be a lot more intensive. I cannot (yet) see a way to change script dynamically without doing this. Maybe there is a way. I know very little about Windows font handling.
Yes. All part of making HexCtrl work for the (at least) 4.5bn people who use these characters. Asia is the most populous continent and I'm sure there are lots of cases I cannot even think of. |
Beta Was this translation helpful? Give feedback.
-
This inconsistency was resolved in 6e87ec3. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this a bug or something I did wrong.
I created a UTF-16 (LE with BOM) test file and added text from several different languages (Chinese, Russian, Japanese, Yiddish and Hindi). The text looks like this in Notepad:
I tried viewing the file in the latest HexCtrl sample by setting the encoding to UTF-16. This only displayed the Russian text:
I wondered if this was a font problem, so I changed the font to Courier New. The result was similar but a little better:
Finally, I tried in another well-known hex application (also using Courier New) as UTF-16. This worked ok:
I have attached the test file to this post.
I'm not sure if this is a UTF-16 interpretation issue or a font problem?
Multilanguage.txt
Beta Was this translation helpful? Give feedback.
All reactions