glow icon indicating copy to clipboard operation
glow copied to clipboard

Chinese language characters are partially garbled

Open wcxu21 opened this issue 1 year ago • 4 comments

Hi I added a Chinese language file based on the English language, but when I tested it, I found that the Chinese characters would have garbled characters at the end. You can check it and fix it, thanks to your work and this free program.

I am using Windows 10 22H2 - 2009 64-bit Chinese system。

2024-04-30_114114

wcxu21 avatar Apr 30 '24 03:04 wcxu21

Hi I added a Chinese language file based on the English language, but when I tested it, I found that the Chinese characters would have garbled characters at the end. You can check it and fix it, thanks to your work and this free program.

I am using Windows 10 22H2 - 2009 64-bit Chinese system。

Hello,

Thanks for the translation. Can you send me the text that seems to be wrong here?

I will test it.

turkaysoftware avatar Apr 30 '24 21:04 turkaysoftware

Hi I added a Chinese language file based on the English language, but when I tested it, I found that the Chinese characters would have garbled characters at the end. You can check it and fix it, thanks to your work and this free program. I am using Windows 10 22H2 - 2009 64-bit Chinese system。

Hello,

Thanks for the translation. Can you send me the text that seems to be wrong here?

I will test it.

I submitted a Chinese language pull request that you can use for testing. Thank you for your work.

wcxu21 avatar May 01 '24 00:05 wcxu21

I think the issue is probably cause by the preset length of StringBuilder not matching the actual utf-8 bytestream length which needs to be processed. Under utf-8, one chinese character consumes 3 bytes, if the number of chinese character strings is odd (e.g 处理器),the last character 器's bytestream will be terminated uncorrectely, therefore causing a display error

cxlanyagege avatar May 01 '24 17:05 cxlanyagege

In applications, using UTF-8 encoding will be more compatible, but garbled characters may also occur due to insufficient bytes.

In some of the applications developed based on the QT platform that I deal with, in the translated binary files, garbled characters often appear due to encoding problems; and some applications that use UTF-8 will also be truncated due to insufficient byte length, and the same is true. Garbled characters similar to Chinese characters will appear.

The way to solve these problems is basically to complete the byte length and select the correct encoding characters.

The Glow application uses the .ini language configuration file, which uses UTF-8 encoding. The front part can be displayed correctly, but the latter part should be considered because the character byte length is not enough.

wcxu21 avatar May 02 '24 03:05 wcxu21

Update:

I am still working on the problem. I am running some tests.

If I get a positive result, I will work on fixing the problem.

turkaysoftware avatar May 24 '24 16:05 turkaysoftware

I've made all the corrections that can be made. There is nothing extra to do anymore.

It may be related to the file encoding of the ini file.

turkaysoftware avatar Jun 09 '24 16:06 turkaysoftware

Chinese spelling bug has been fixed. Chinese language will be available with Glow v24.11.

turkaysoftware avatar Jun 24 '24 12:06 turkaysoftware