This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Crazy unicode : How g and ɡ look the same but are two different characters
Type: behavior Stage: resolved
Components: Unicode Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Christian.Kleineidam, ezio.melotti, vstinner
Priority: normal Keywords:

Created on 2014-09-10 19:05 by Christian.Kleineidam, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg226708 - (view) Author: Christian Kleineidam (Christian.Kleineidam) Date: 2014-09-10 19:05
g = 2
i = 2
ɡ = 1
a = g + i
a
>>> 4

Given the font on which this bug tracker runs it's possible to see why a is 4 and not 3. On the other hand there are plenty of fonts (such as Arial, Tahoma or Courier New) that display chr(103) and chr(609) the same way. If a programmer is not aware of the issue it will make it nearly impossible to spot bugs that come up when someone names variables or functions via using chr(609). 

Python should either forbid people from using chr(609) to name functions and variables or treat it as a synonym of chr(103).
msg226709 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-09-10 19:13
The same happens with 'l' and 'I' on some fonts.
Forbid those chars or treat them as synonyms is not an option.
msg226719 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-09-10 21:16
Just avoid using such symbols in your application.
History
Date User Action Args
2022-04-11 14:58:07adminsetgithub: 66577
2014-09-10 21:16:09vstinnersetmessages: + msg226719
2014-09-10 19:13:03ezio.melottisetstatus: open -> closed
versions: - Python 3.1, Python 3.2, Python 3.3, Python 3.4
messages: + msg226709

resolution: not a bug
stage: resolved
2014-09-10 19:05:03Christian.Kleineidamcreate