dlangide icon indicating copy to clipboard operation
dlangide copied to clipboard

source editor cann't input utf8 charactor

Open LukyGuyLucky opened this issue 2 years ago • 5 comments

The IDE source editor input ascii (common English)character and displays correctly,but when input UTF8/UTF16 characters,say,Japanese/Russian/Chinese characters,lik: "早上好“,”我爱World Cup“,”D语言很优美“,all display incorrectly in a mess.

Checked the latest precompiled binary built (downloaded from this site several years ago ),this issue exists.

At the meanwhile,was wondering the console shows local host 0.0.0.0:8080 other than 127.0.0.1:8080

Snipaste_2023-04-17_15-32-00 23 224

LukyGuyLucky avatar Apr 17 '23 07:04 LukyGuyLucky

This might be as simple as font issues. Related: https://github.com/buggins/dlangui/issues/584 dlangui is more than capable of rendering correct characters, but a relevant font must be used. Can you somehow set-up the editor font? I can't remember right now. Will look into it later too

GrimMaple avatar Apr 17 '23 15:04 GrimMaple

In my built package,it turned out that disable freetype font using windows system font raises the issue.Enable freetype and choose a proper font(say Arial) works now.

LukyGuyLucky avatar Apr 18 '23 02:04 LukyGuyLucky

A person in this issue https://github.com/buggins/dlangui/issues/652 mentioned, that there are issues with WinAPI font loading. However, I can't seem to work out how to enter Japanese characters nonetheless. I'm going to mark this as a bug for now and see if it can be fixed.

GrimMaple avatar Apr 18 '23 14:04 GrimMaple

Just noticed the compiler log windows can't show UTF8(Chinese) charaters neither,that's from MS VC linker I guess.In a console bud build,those charaters display correctly. 225

LukyGuyLucky avatar Apr 19 '23 02:04 LukyGuyLucky

Console not being able to display UTF-8 is very logical, Windows always has issues with that. It's most likely encoding settings or whatever. But there's definitely something fishy going on with font loading in dlangui.

GrimMaple avatar Apr 19 '23 11:04 GrimMaple