[issue20033] Fix makelocalealias.py for Python 3

Serhiy Storchaka report at bugs.python.org
Fri Dec 20 12:05:01 CET 2013


New submission from Serhiy Storchaka:

When Tools/i18n/makelocalealias.py was ported to Python 3 some things were not fixed.

1. locale.alias is opened as binary file in Python 2, but as text file (with locale encoding) in Python 3. This can cause fail when the script runs in UTF-8 locale because locale.alias contains non-ASCII locales ('bokmål' and 'français', encoded in Latin1).

2. In Python 2 %r formatting always produce ASCII output. In Python 3 %a should be used to produce the same output.

Proposed patch fixes these minor bugs.

----------
components: Demos and Tools
files: locale_py3k.patch
keywords: patch
messages: 206675
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix makelocalealias.py for Python 3
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33230/locale_py3k.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20033>
_______________________________________


More information about the Python-bugs-list mailing list