[Python-Dev] fun with unicode, part 1
Fredrik Lundh
Fredrik Lundh" <effbot@telia.com
Tue, 2 May 2000 10:36:40 +0200
Neil Hodgson wrote:
> Its decided by each file system.
...but the system API translates from the active code page to the
encoding used by the file system, right?
on my w95 box, GetACP() returns 1252, and GetOEMCP() returns
850. =20
if I create a file with a name containing latin-1 characters, on a
FAT drive, it shows up correctly in the file browser (cp1252), and
also shows up correctly in the MS-DOS window (under cp850).
if I print the same filename to stdout in the same DOS window, I
get gibberish.
> > > On Windows 95/98, the Unicode variants of the Win32 API calls =
don't
> > > exist. So what is the poor Python runtime to do there?
>=20
> Fail the call.
...if you fail to convert from unicode to the local code page.
</F>