[fpc-devel] Changing Windows API A routines in SysUtils to W in Windows NT

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Feb 7 08:35:54 CET 2012


Michael Van Canneyt schrieb:

> As you know, we are very keen on backwards compatibility.

ACK.

> Are you sure that if a AnsiString filename which contains 
> codepage-specific characters is used to open a file, it will still open 
> the same file after this patch is applied ?

Win32 filesystems store long filenames in Unicode (UTF-16), I'd not 
expect problems in addressing files using UnicodeStrings.

> In particular, does the opening of a DOS-style filename (Program~1\blah) 
> still work as it used to ?

I'm not sure, but aren't DOS filenames restricted to the OEM codepage? 
There exists no direct correspondence between long filenames and their 
8.3 names, which may have any number after "~", depending on the 
contents of the directory. Such names never should occur hard-coded in 
an application.

DoDi




More information about the fpc-devel mailing list