[fpc-devel] "Value" chunk encoding in RSJ files

Maxim Ganetsky ganmax at narod.ru
Thu Jul 14 14:48:23 CEST 2016


Hello.

I noticed that in RSJ file when resource string has e.g. Cyrillic
symbols "Value" chunk doesn't seem to have UTF-16 encoding (but it
should according to comment in cresstr.pas).

Example for 'Тест' resource string (originally encoded in UTF-8):

{"version":1,"strings":[
{"hash":264409906,"name":"unit1.teststr","sourcebytes":[208,162,208,181,209,129,209,130],"value":"\u00D0\u00A2\u00D0\u00B5\u00D1\u0081\u00D1\u0082"}
]}

Unicode values seem to be just source bytes values converted to hex
representation.

I use FPC 3.0.0. Is it a bug or I don't understand something?

-- 
Best regards,
 Maxim Ganetsky                  mailto:ganmax at narod.ru



More information about the fpc-devel mailing list