New submission from STINNER Victor <victor.stin...@haypocalc.com>:

bz2 uses "s" format to parse the filename argument: it uses the default 
(unicode) encoding to encode the unicode filename to a byte string. It should 
use the default file system encoding instead.

It should also support surrogates in unicode filename and bytes/bytearray 
filenames.

Attached patch uses PyUnicode_FSConverter() to implement that.

----------
components: Library (Lib), Unicode
files: bz2_surrogates.patch
keywords: patch
messages: 103696
nosy: haypo
severity: normal
status: open
title: bz2: support surrogates in filename, and bytes/bytearray filename
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file17006/bz2_surrogates.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8468>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to