A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-February/033269.html below:

[Python-Dev] Unicode filenames

[Python-Dev] Unicode filenames [Python-Dev] Unicode filenamesWalter Dörwald walter@livinglogic.de
Mon, 10 Feb 2003 13:45:17 +0100
Just van Rossum wrote:

> [...]
> BTW. if I try to create a file with an 8-bit filename which is _not_
> valid utf-8, I get a strange error:
> 
>   >>> f = open("\xff", "w")
>   Traceback (most recent call last):
>     File "<stdin>", line 1, in ?
>   IOError: invalid mode: w
>   >>> 
> 
> This exception is thrown when errno is EINVAL, which apparently can also
> mean that the filename arg is bad. Not sure if we can fix this.

But when the system default encoding (i.e. sys.getdefaultencoding()) and
the file system encoding are different, I'd say the filename has to be
transcoded from the system default encoding to the filesystem encoding
before it is used.

Bye,
    Walter Dörwald




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4