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

The Python 3 parser normalizes all identifiers using NFKC (as described in the 
PEP 3131). Examples:
 - U+00B5 (µ: Micro sign) is normalized to U+03BC (μ: Greek small letter mu)
 - U+FB03 (ffi: Latin small ligature ffi) is normalized to 'ffi'

The problem is that it does also normalize module names, but not the filename.

The module name in the Python source code is written with the keyboard (eg. 
U+00B5 in my case) and then normalized to NFKC (=> U+03BC). The filename is 
also written using the keyboard (U+00B5), but it is never normalized.

Attached script tests the current behaviour using "µTorrent" name with U+00B5 
and U+03BC: import with U+00B5 or U+03BC use the filename with U+03BC.

The problem is that I'm able to write 'µ' (U+00B5) with my keyboard, but not 
U+03BC (μ).

----------
components: Interpreter Core, Unicode
files: module_name.py
messages: 126577
nosy: haypo
priority: normal
severity: normal
status: open
title: Don't normalize module names to NFKC?
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20459/module_name.py

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

Reply via email to