Korean text is broken when extract strings from a source.

This forum designated to discuss the TsiLang Components Suite.
Post Reply
Ilgyu
Posts: 7
Joined: Wed Feb 19, 2020 4:43 am

Korean text is broken when extract strings from a source.

Post by Ilgyu »

There are 2 problems.

1. If I click the "Strings in source" button, TsiLang extracts all strings from the source code and showing the list.
But Korean text is shown broken. Broken text is inputted to the source code as it is. So I cannot build the source code and I cannot read text from Translation Editor. (Please see the linked image)

2. In the C++Builder, Unicode text must be entered with "L" in front of it.
ex) L"Unicode text"
But when text is replaced to GetTextOrDefault() function, only "" is replaced except for 'L'.
If TsiLang component name is "siLang", this is replaced like this,
L"ABCDEFG" -> LsiLang("IDS_01")

I will appreciate it if you fix these problems ASAP.
Thank you.

Image

isiticov
Site Admin
Posts: 2255
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Could you please send us sample project for this problem?
Are you using the latest version?

Thank you in advance.
Best regards,
Igor Sitikov.

Ilgyu
Posts: 7
Joined: Wed Feb 19, 2020 4:43 am

Post by Ilgyu »

You can reproduce in simple way. Add code like "ShowMessage(L"한글 문�열입니다.");", and press 'ctrl+L' to open TsiLang Expert,
Then press 'Strings in Source', you can see the same result.
(If you want sample code, please download from here.)

FYI, I'm using C++Builder 10.2.3. (RAD Studio XE10 10.2.3) and TsiLang 7.8.0.1.

Thank you.

isiticov
Site Admin
Posts: 2255
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Unfortunately, your sample and our tests with Korean text work just fine on our side:
Image

May be there is some other settings we shall try? But exactly your sample works just fine here :(

We will see what could be done with L prefix, actually it is not needed for TsiLang as TsiLang's methods return Unicode string so this "L" prefix could be just removed. You can remove it yourself in your code before scanning the source with TsiLang Expert.

Ilgyu
Posts: 7
Joined: Wed Feb 19, 2020 4:43 am

Re: Korean text is broken when extract strings from a source.

Post by Ilgyu »

It seems that the results are different depending on the Locale settings of Windows.
In my PC, Korean character was always broken even locale was set to English. I think Korean font or other setting might be caused this issue, so I have installed new PC and set only English.
It is working well in the new PC. I don't know what makes this difference.

Post Reply