Page 1 of 1

StoreAsUTF8 setting

Posted: Wed Feb 03, 2021 4:18 pm
by BillyC
Hi there,

Just a question about the StoreAsUTF8 settings, not sure if I'm using this correctly in Delphi 10.2, components suite 7.8.4.

with the setting set to true, I see this in the dfm file:
'Label1'#1'Happy New Year'#1#26032#24180#24555#20048#1#1057' '#1053#1086#1074#1099#1084' '#1043#1086#1076#1086#1084#1#13#10

Should I be expecting to see this with StoreAsUTF8 = True? Is there a way to store the data like this?
'Label1'#1'Happy New Year'#1'新年快乐'#1#'С Новым Годом'#1#13#10

thanks.

Re: StoreAsUTF8 setting

Posted: Thu Feb 04, 2021 5:11 am
by isiticov
Hello,

No, StoreAsUTF8 mostly needed for earlier version of IDEs that don't support Unicode. Setting this to true will encode TsiLang translations data to UTF-8 encoding. This is also useful if you use SIL files as they are plain text files and you have different Unicode (or locale) languages.
IDE converts Unicode or UTF-8 encoded string characters inside DFM using binary codes, as you can see in your case. This is how DFM streaming is realized.
Hope this helps.