[fpc-devel] RTL and Unicode filenames operations.

Marco van de Voort marcov at stack.nl
Sun Mar 21 17:29:23 CET 2010


In our previous episode, Martin Schreiber said:
> > Yes, it does so and i see no problems here. The package also converts
> > UTF-16 to ansi encoding for Win9x.
> > Converting string from UTF16 to UTF8 (or any other encoding) is not
> > much time penalty comparing to the time of the file operation itself.
> 
> Agreed. The MSEgui file utils do the same with good results.

> If I understand right, Marco insists that on Linux utf-8 should be used for
> file operations because it is the "native" file name encoding on Linux. 

On Linux and FreeBSD yes, everything is UTF-8. Then using UTF-16 types here
and there should not be necessary. Even if it is not a performance killer.

> don't know how that can be achieved BTW.  On Windows and Mac utf-16 is
> then native filename encoding so I don't understand why the API can't be
> standardised to utf-16.

For the same reason why the Unix rtl is not a Windows emulation. We are
writing a multiplatform compiler and rtl, not an emulation.

The Delphi stuff causes already enough windowsisms. Let's not add one.



More information about the fpc-devel mailing list