magiblot / turbo

An experimental text editor based on Scintilla and Turbo Vision.
Other
442 stars 35 forks source link

Korean input support #46

Open Kangmo opened 1 year ago

Kangmo commented 1 year ago

Issue 1: When I type a Korean character(two byte width per Korean character), scrollbar is broken.

스크린샷 2023-01-03 오전 8 24 37

Issue 2: When I type a second Korean character, the first Korean character becomes one byte strange character.

스크린샷 2023-01-03 오전 8 24 48

Thanks for the great project again!

magiblot commented 1 year ago

Hi Kangmo, thanks for your comments and suggestions.

Kangmo commented 1 year ago

Hi, magiblot, i am using Macos Ventura 13.1 and tested in the default command terminal app.

here are the two characters 한글

I will try to run the terminal in my windows env

magiblot commented 1 year ago

No, don't worry about Windows if you weren't using it.

If you run the locale command, what output do you get?

Kangmo commented 1 year ago

Hi magiblot, here is the outout of locale

$ locale LANG= LANGUAGE= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL=

magiblot commented 1 year ago

Hi Kangmo!

This issue is caused by your terminal locale settings. Turbo needs at least the LC_CTYPE variable to be set to a UTF-8 encoding.

In macOS's default terminal this can be fixed through Preferences > Advanced:

Screenshot_20230602_210845

You will then have to start a new terminal session for the changes to take effect.

If your terminal does not allow you to change this, then you will have to change these variables manually as explained in the several answers and comments from this StackOverflow question: https://stackoverflow.com/questions/7165108/in-os-x-lion-lang-is-not-set-to-utf-8-how-to-fix-it

Kangmo commented 10 months ago

Magiblot, thanks for the comment. I will check this out and close the issue.