On Thursday 24 September 2015 08:42:11 Jonas Maebe wrote: > Martin Schreiber wrote: > > 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? > > I have no idea. I only looked at the compiler/cresstr.pas unit and saw > that the codepage of resource strings stored in the object code is set > to the source file code page. I don't even know how the .rst/.rsj files > are used by the compiler or RTL (or external tools), and have never > worked on this aspect of the compiler/RTL. > Ouch. I hope you understand my frustration. Now we have the overly complicated codepage aware ansistring which nobody uses, not even Lazarus uses utf8string but sets default codepages to utf-8 instead and Delphi removed it from the newer compilers already, but we still have no full Unicode resourcestring environment which was the only missing piece in order to make comfortable Unicode applications since the implementation of widestring/unicodestring many years ago. Should I make a bug report?
Another question, it looks to me that -Fcutf8 does not work like {$codepage utf8} for string constants. Is this intend? Martin _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal