🐛 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:
2026-11-15 22:06:51 +01:00
parent 81f837a746
commit 32b8d99f3e
+2 -1
View File
@@ -85,7 +85,8 @@ end;
function TLocalizationEntry.GetSize: Integer; function TLocalizationEntry.GetSize: Integer;
begin begin
Result := SizeOf(Integer) + SizeOf(Byte) + SizeOf(SmallInt) + Length(FText); Result := SizeOf(Integer) + SizeOf(Byte) + SizeOf(SmallInt)
+ Length(UTF8Encode(FText));
end; end;
end. end.