buggins / dlangide

D language IDE based on DlangUI
Boost Software License 1.0
451 stars 56 forks source link

source editor cann't input utf8 charactor #430

Open LukyGuyLucky opened 1 year ago

LukyGuyLucky commented 1 year ago

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

GrimMaple commented 1 year ago

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

LukyGuyLucky commented 1 year ago

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.

GrimMaple commented 1 year ago

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.

LukyGuyLucky commented 1 year ago

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

GrimMaple commented 1 year ago

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.