The text encoding is corrupted when it is inserted into pas

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Stalker4
Posts: 31
Joined: Wed Apr 05, 2017 7:18 am

The text encoding is corrupted when it is inserted into pas

Post by Stalker4 »

Hi All,

TsiLang 7.5.6.2, Delphi 10.2.1 Tokio

There is a program module (pas + dfm).
pas-file in ANSI encoding (Win1251).

The pas-file contains a string constant in the Win1251 encoding,
see picture
Image.

I select this line in the editor, in the context menu I select the item "TsiLang Expert->Scan selected source ..."
and click "Modify Source" in the "Found String Constants" window.

After that, the text with spoiled encoding is inserted into the program code, see picture
Image

You need to fix this error.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Thank you for reporting this. We will try to fix this.
Best regards,
Igor Siticov.
Stalker4
Posts: 31
Joined: Wed Apr 05, 2017 7:18 am

Post by Stalker4 »

isiticov wrote:Hello,
Thank you for reporting this. We will try to fix this.
Good. Please let us know in this thread the version of the library in which you will correct this error.

A small request: Add to the expert settings the constant for brackets "(*" and "*)".
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Stalker4 wrote:A small request: Add to the expert settings the constant for brackets "(*" and "*)".
Could you please describe a little bit more what did you mean? Thank you in advance.
Best regards,
Igor Siticov.
Stalker4
Posts: 31
Joined: Wed Apr 05, 2017 7:18 am

Post by Stalker4 »

isiticov wrote:
Stalker4 wrote:A small request: Add to the expert settings the constant for brackets "(*" and "*)".
Could you please describe a little bit more what did you mean? Thank you in advance.
For example, there is such code:

Code: Select all

ShowMessage('is my text')
After processing it with "TsiLang Expert->Scan selected source ..." changes are made to the code:

Code: Select all

ShowMessage(siLangLinked.GetTextOrDefault('IDS_37' (* 'is my text' *) ))
So I want TsiLang to be able to specify the kind of brackets for comments (* *) for the translated text.
For example, braces are more convenient for me, that is, so that I can do this:

Code: Select all

ShowMessage(siLangLinked.GetTextOrDefault('IDS_37' { 'is my text' } ))
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

We will try to implement this.
Best regards,
Igor Siticov.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

FYI: Just released version 7.5.7 includes this fix and improvement mentioned.
Best regards,
Igor Siticov.
Stalker4
Posts: 31
Joined: Wed Apr 05, 2017 7:18 am

Post by Stalker4 »

Checked, now everything works correctly.
Thank you.
Post Reply