[fpc-pascal] FileIO in FPC 3.0

Michael Van Canneyt michael at freepascal.org
Fri Sep 25 10:26:44 CEST 2015



On Fri, 25 Sep 2015, Andreas Dorn wrote:

> Hi there,
>  
> In the discussion about resourcestrings I read that the RTL now uses codepage-aware strings for FileIO.
> So I wonder what kind of codepages do you use for FileIO?

It uses UTF16 on windows, not a codepage aware string.

So if you use widestring for all your filename strings, there will be no problem. 
No conversions will happen.

If you so desire, you can start with a single-page, codepage aware string, but the RTL will convert it 
to UTF16 on windows anyway. if your codepage aware string contains "invalid" bytes, then 
the conversion may fail.

Michael.


More information about the fpc-pascal mailing list