Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18822

Re: UnicodeEncodeError in compile

Date 2012-01-11 06:45 -0500
From Dave Angel <d@davea.name>
Subject Re: UnicodeEncodeError in compile
References <9043309.329.1326169476466.JavaMail.geo-discussion-forums@yqhi24> <jegrmo$juv$1@dough.gmane.org> <mailman.4625.1326253880.27778.python-list@python.org> <9664479.1553.1326281266242.JavaMail.geo-discussion-forums@yqlp13>
Newsgroups comp.lang.python
Message-ID <mailman.4641.1326282354.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 01/11/2012 06:27 AM, pyscripter@gmail.com wrote:
> <SNIP>
> Maybe the example of this question can be added to the issue 13785 as a proof that compile fails on valid file names.
>
> But I think the real issue is why on modern Windows systems the file system encoding is mbcs.  Shouldn't it be utf-16?
Depends what you mean by modern. The following isn't true for Windows 
95, 98, nor ME.  But they weren't modern when they were first released.

NT systems, (which includes Win2k, XP, Vista, and Win7)  for at least 
the last 15 years, have used Unicode for the file system.  They also 
supply an "ASCII" interface.  If Python is using the latter, then it 
won't be able to access all possible files.

Now, it may be the fault of the C library that CPython uses.  I haven't 
looked at any of the code for CPython.

This is all from memory, as I haven't actively used Windows for some 
time now.  But I think the DLL name is kernel32.dll, and the entry 
points have names like  CreateFileW() for the unicode open, and 
CreateFileA() for the "ASCII" open.

-- 

DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

UnicodeEncodeError in compile pyscripter@gmail.com - 2012-01-09 20:24 -0800
  Re: UnicodeEncodeError in compile Terry Reedy <tjreedy@udel.edu> - 2012-01-10 03:08 -0500
    Re: UnicodeEncodeError in compile jmfauth <wxjmfauth@gmail.com> - 2012-01-10 01:42 -0800
    Re: UnicodeEncodeError in compile 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-10 02:53 -0800
      Re: UnicodeEncodeError in compile jmfauth <wxjmfauth@gmail.com> - 2012-01-10 04:28 -0800
        Re: UnicodeEncodeError in compile jmfauth <wxjmfauth@gmail.com> - 2012-01-10 05:43 -0800
          Re: UnicodeEncodeError in compile Terry Reedy <tjreedy@udel.edu> - 2012-01-10 19:56 -0500
            Re: UnicodeEncodeError in compile jmfauth <wxjmfauth@gmail.com> - 2012-01-11 01:29 -0800
            Re: UnicodeEncodeError in compile jmfauth <wxjmfauth@gmail.com> - 2012-01-10 23:05 -0800
    Re: UnicodeEncodeError in compile 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-10 02:53 -0800
  Re: UnicodeEncodeError in compile pyscripter@gmail.com - 2012-01-10 02:04 -0800
  Re: UnicodeEncodeError in compile Terry Reedy <tjreedy@udel.edu> - 2012-01-10 22:50 -0500
    Re: UnicodeEncodeError in compile pyscripter@gmail.com - 2012-01-11 03:27 -0800
      Re: UnicodeEncodeError in compile Dave Angel <d@davea.name> - 2012-01-11 06:45 -0500
        Re: UnicodeEncodeError in compile pyscripter@gmail.com - 2012-01-11 04:14 -0800
        Re: UnicodeEncodeError in compile pyscripter@gmail.com - 2012-01-11 04:14 -0800
    Re: UnicodeEncodeError in compile pyscripter@gmail.com - 2012-01-11 03:27 -0800

csiph-web