[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-07 Thread SilentGhost


SilentGhost  added the comment:

Ramin, I agree with Victor, if you have any information contrary to what we 
posted, please feel free to post it here so that we can consider re-opening the 
issue.

--
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-07 Thread STINNER Victor

STINNER Victor  added the comment:

> Regarding the file named: "Lib/encodings/mac_farsi.py", the numbers are 
> inserted in the wrong way, they are inserted Arabic numbers instead of 
> Persian, they are edited in the comment.

Python implements the Unicode standard. In the master branch, it's the Unicode 
standard version 11.0. It gives these character names:

$ python3
>>> import unicodedata
>>> for ch in list(range(0x06f0, 0x06f9+1)) + [0x06A9]:
...  print("U+%04x: %s" % (ch, unicodedata.name(chr(ch
... 

U+06f0: EXTENDED ARABIC-INDIC DIGIT ZERO
U+06f1: EXTENDED ARABIC-INDIC DIGIT ONE
U+06f2: EXTENDED ARABIC-INDIC DIGIT TWO
U+06f3: EXTENDED ARABIC-INDIC DIGIT THREE
U+06f4: EXTENDED ARABIC-INDIC DIGIT FOUR
U+06f5: EXTENDED ARABIC-INDIC DIGIT FIVE
U+06f6: EXTENDED ARABIC-INDIC DIGIT SIX
U+06f7: EXTENDED ARABIC-INDIC DIGIT SEVEN
U+06f8: EXTENDED ARABIC-INDIC DIGIT EIGHT
U+06f9: EXTENDED ARABIC-INDIC DIGIT NINE
U+06a9: ARABIC LETTER KEHEH

>>> unicodedata.unidata_version
'11.0.0'

I still see "ARABIC" in character names.

> The KAF character (ك)

That's the Unicode character: U+0643 called "ARABIC LETTER KAF".

Comments in 
https://github.com/python/cpython/blob/master/Lib/encodings/mac_farsi.py still 
seems to be up to date.

SilentGhost:
> The replacement character that you're proposing is called (according to the 
> same database) 'ARABIC LETTER KEHEH', whereas the old one was 'ARABIC LETTER 
> KAF'. This encoding was originally generated based on data from unicode.org, 
> I'd think a reference would be needed making clear that this is indeed a 
> valid replacement.

mac_farsi.py docstring says:

""" Python Character Mapping Codec mac_farsi generated from 
'MAPPINGS/VENDORS/APPLE/FARSI.TXT' with gencodec.py.

The mapping comes from Unicode. Was it updated since this file was created?

The latest change in this file was made in 2007, a few years ago :-)

--

I don't see anything wrong, I suggest to close the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread Ned Deily


Change by Ned Deily :


--
nosy: +lemburg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread SilentGhost


SilentGhost  added the comment:

The names of the characters given in comments agree with the unicode database 
name (they're indeed ARABIC-INDIC DIGITs and ARABIC LETTER).

The replacement character that you're proposing is called (according to the 
same database) 'ARABIC LETTER KEHEH', whereas the old one was 'ARABIC LETTER 
KAF'. This encoding was originally generated based on data from unicode.org, 
I'd think a reference would be needed making clear that this is indeed a valid 
replacement.

--
components: +Unicode, macOS
nosy: +SilentGhost, ezio.melotti, ned.deily, ronaldoussoren, vstinner
type: enhancement -> behavior
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread Ramin Najjarbashi


Change by Ramin Najjarbashi :


--
keywords: +patch
pull_requests: +13747
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13871

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread Ramin Najjarbashi

New submission from Ramin Najjarbashi :

Regarding the file named: "Lib/encodings/mac_farsi.py", the numbers are 
inserted in the wrong way, they are inserted Arabic numbers instead of Persian, 
they are edited in the comment.
The KAF character (ك) which was the Arabic version, has been changed and edited 
to the Persian version(ک).

It's not a big deal, but it's my first step to improve my favorite language ;)

--
messages: 344850
nosy: RaminNietzsche
priority: normal
severity: normal
status: open
title: Fix Persian KAF in mac_farsi.py
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com