[fpc-devel] Unicode paths

Marco van de Voort marcov at stack.nl
Tue Apr 12 10:53:40 CEST 2016


In our previous episode, Jonas Maebe said:
> They are not supported, because we get the original command line data 
> using the ansi version of the API call (see setup_arguments() in 
> rtl/win/syswin.inc). If this is "fixed", then we also have to decide 
> what to do with the argv p(ansi)char (a good place would be to check 
> what Windows itself returns from the ansi API call when passing command 
> line arguments that contain characters that cannot be represented in the 
> ansi code page.

The central place of posix argv/argc in the command processing (including
getopts), also on nonposix systems is indeed a bit of a problem.

I guess the only way, as always, is to have two duplicate systems on
windows.  One wide that is for unicode, (unicodestring paramstr and
D2009 compatible tapplication), one for old legacy ansi apps. (getopts etc).

That pains me however, I always liked getopts for a quick program over
TCustomApplication.

> Another way to know it is not supported, is that it is not listed at 
> http://wiki.freepascal.org/FPC_Unicode_support#RTL_changes (*)

I must have taken talk about it and considered it implemented. I did look,
but only the existence of the call, not its implementation :-)



More information about the fpc-devel mailing list