Page 1 of 1

The text encoding is corrupted when it is inserted into pas

Posted: Fri Oct 13, 2017 4:32 pm
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.

Posted: Sun Oct 15, 2017 3:15 am
by isiticov
Hello,

Thank you for reporting this. We will try to fix this.

Posted: Mon Oct 16, 2017 9:31 am
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 "*)".

Posted: Tue Oct 17, 2017 3:07 am
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.

Posted: Tue Oct 17, 2017 10:47 am
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' } ))

Posted: Tue Oct 17, 2017 11:05 am
by isiticov
We will try to implement this.

Posted: Wed Nov 08, 2017 9:45 am
by isiticov
FYI: Just released version 7.5.7 includes this fix and improvement mentioned.

Posted: Tue Nov 14, 2017 9:05 am
by Stalker4
Checked, now everything works correctly.
Thank you.