[fpc-devel] UTF8 RTL

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Nov 24 15:25:00 CET 2014


Mattias Gaertner wrote on ma, 24 nov 2014:

> On Sun, 23 Nov 2014 17:42:06 +0100 (CET)
> At the moment uuchar ParamStr only contains a typecast:
>
>     if (Param=0) then
>       Paramstr:=System.Paramstr(0)
>     else if (Param>0) and (Param<argc) then
>       paramstr:=UnicodeString(Argv[Param])
>     else
>       paramstr:='';
>
>
> Unit LazUTF8 contains a procedure SetupCommandlineParametersWide, that
> uses GetCommandLineW and creates an ArgW array, similar to the
> Argv array.
> Should I adapt that for uuchar?

Probably, yes. However:
* since we're close to branching/releasing 2.8, I am not very much in  
favour of still modifying core RTL routines like this for inclusion in  
2.8 (this also goes for the defaultformatsettings related patch you  
posted to the bug tracker). I understand that this will make it harder  
to use the current RTL with Lazarus, but that can be improved for  
2.8.2 yet. It's more important (to me) that what's there is stable,  
than supporting everything but the kitchen sink and having annoying  
bugs.
* make functionality codepag-aware should be done for all platforms at  
the same time, otherwise it will become impossible to write  
cross-platform programs that have similar behaviour everywhere (and  
the list at http://wiki.freepascal.org/FPC_Unicode_support#RTL_changes  
will become unreadable, just like the documentation). In general you  
need a specific implementation for Windows and for Unix, and for all  
other platforms (which don't have codepage support yet) it's a  
mechanical change that is more or less identical. See the commits to  
the cpstrrtl branch for examples.


Jonas



More information about the fpc-devel mailing list