🐛 Report the encoded size of localization entries
GetSize counted characters while serialization writes UTF-8 bytes, desynchronizing any offset arithmetic for non-ASCII text.
This commit is contained in:
@@ -85,7 +85,8 @@ end;
|
||||
|
||||
function TLocalizationEntry.GetSize: Integer;
|
||||
begin
|
||||
Result := SizeOf(Integer) + SizeOf(Byte) + SizeOf(SmallInt) + Length(FText);
|
||||
Result := SizeOf(Integer) + SizeOf(Byte) + SizeOf(SmallInt)
|
||||
+ Length(UTF8Encode(FText));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user