[New-bugs-announce] [issue10952] Don't normalize module names to NFKC?
report at bugs.python.org
Thu Jan 20 02:54:59 CET 2011
New submission from STINNER Victor <victor.stinner at 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 (ﬃ: 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
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 <report at bugs.python.org>
More information about the New-bugs-announce