On Thu, 24 Sep 2015, Martin Schreiber wrote:

On Monday 21 September 2015 11:06:53 Jonas Maebe wrote:
Martin Schreiber wrote on Sun, 20 Sep 2015:
Are there any changes? How resourcestrings are encoded?

Resourcestrings are stored using the same code page as constant
ansistrings in the source file in which they are defined (i.e.,
according to the rules for constant ansistrings described on
http://wiki.freepascal.org/FPC_Unicode_support ).

Thank you.

FPC fixes_3_0 with the program
"
program json;
{$codepage utf8}
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses
{$ifdef FPC}{$ifdef unix}cthreads,cwstring,{$endif}{$endif}
sysutils;
resourcestring
a = 'aäÄ';
begin
end.
"
produces the file json.rsj
"
{"version":1,"strings":[
{"hash":7200948,"name":"json.a","value":"a\u00C3\u00A4\u00C3\u0084"}
]}
"
Is this intended? How can translation tools know that the Unicode points must
be interpreted as utf-8 code units in this case?

What did you expect to see ?

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to