View Issue Details

IDProjectCategoryView StatusLast Update
0038898pas2jsrtlpublic2021-05-21 12:15
ReporterYuri Serebrennikov Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0038898: TBinaryObjectReader.ReadString
DescriptionI use
If you set the Cyrillic text in design mode, then it is displayed incorrectly.
If lfm file contains Cyrillic symbols, then this is a problem

i have debugged this problem and see in the classess.pas next code

function TBinaryObjectReader.ReadString(StringType: TValueType): String;
for I:=1 to Length(Result) do
    FStream.ReadbufferData(C); // <--- read symbol
    Result[i]:=C; // <-- assigned incorrect symbol

It seems to me that there are problems with reading the property value.

Additional InformationMore details i write here
TagsNo tags attached.
Fixed in Revision
Attached Files


Yuri Serebrennikov

2021-05-15 18:03

reporter   ~0130903 (107,935 bytes)

Yuri Serebrennikov

2021-05-15 18:06

reporter   ~0130904 (453,925 bytes)

Michael Van Canneyt

2021-05-15 18:48

administrator   ~0130905

The strings are expected to be in UTF16 format. If they are not, then that is the problem.

Yuri Serebrennikov

2021-05-15 19:09

reporter   ~0130906

Lazarus create *.lfm files in UTF8 format.


2021-05-21 11:38

reporter   ~0130986

To resolve this problem, you need to declare the TextDecoder class

And in the commented snippet create such a class and decode the text for what you want.

Michael Van Canneyt

2021-05-21 12:15

administrator   ~0130987

This should normally be handled by TEncoding, it's on my todo list to implement this on top of TextDecoder.

Issue History

Date Modified Username Field Change
2021-05-15 18:00 Yuri Serebrennikov New Issue
2021-05-15 18:03 Yuri Serebrennikov Note Added: 0130903
2021-05-15 18:03 Yuri Serebrennikov File Added:
2021-05-15 18:06 Yuri Serebrennikov Note Added: 0130904
2021-05-15 18:06 Yuri Serebrennikov File Added:
2021-05-15 18:48 Michael Van Canneyt Note Added: 0130905
2021-05-15 19:09 Yuri Serebrennikov Note Added: 0130906
2021-05-21 11:38 henrique Note Added: 0130986
2021-05-21 12:15 Michael Van Canneyt Note Added: 0130987