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: Implement mac_romanian and mac_croatian encodings
Type: Stage:
Components: Library (Lib) Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Behdad.Esfahbod, lemburg, loewis, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-04-23 19:02 by Behdad.Esfahbod, last changed 2022-04-11 14:58 by admin.

Messages (8)
msg241879 - (view) Author: Behdad Esfahbod (Behdad.Esfahbod) Date: 2015-04-23 19:02
They are used in OpenType fonts, but not implemented by Python at this time.  Here's are the Unicode mappings for them:

http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMANIAN.TXT
http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/CROATIAN.TXT

Thanks.
msg241933 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2015-04-24 11:31
On 23.04.2015 21:02, Behdad Esfahbod wrote:
> 
> They are used in OpenType fonts, but not implemented by Python at this time.  Here's are the Unicode mappings for them:
> 
> http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMANIAN.TXT
> http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/CROATIAN.TXT

Can you provide some evidence that these are still in use (I mean
content being available encoded in these encodings) ?
msg241971 - (view) Author: Behdad Esfahbod (Behdad.Esfahbod) Date: 2015-04-24 19:08
Very valid question.  Let me ask and get back to you.
msg241973 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-04-24 19:25
Guido's time machine strikes back.

>>> 'π–∆'.encode('mac_romanian')
b'\xb9\xd0\xc6'
>>> 'π–∆'.encode('mac_croatian')
b'\xf9\xe0\xb4'
msg241974 - (view) Author: Behdad Esfahbod (Behdad.Esfahbod) Date: 2015-04-24 19:28
Huh.  So they are implemented, even though they are not in aliases.py.  Sorry about the noise!  Please add them to aliases.py.
msg241975 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-04-24 19:39
What aliases have these encodings?
msg241976 - (view) Author: Behdad Esfahbod (Behdad.Esfahbod) Date: 2015-04-24 19:47
Similar encodings have an alias that removes the underscore:

https://github.com/python/cpython/blob/master/Lib/encodings/aliases.py#L435
msg241977 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2015-04-24 19:56
On 24.04.2015 21:25, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka added the comment:
> 
> Guido's time machine strikes back.
> 
>>>> 'π–∆'.encode('mac_romanian')
> b'\xb9\xd0\xc6'
>>>> 'π–∆'.encode('mac_croatian')
> b'\xf9\xe0\xb4'

Ah, I should have looked in the encodings package first :-)

r39779 | lemburg | 2005-10-21 15:58:32 +0200 (Fri, 21 Oct 2005) | 3 lines

Add a few more Mac OS encodings. The mapping tables for these are
available at ftp.unicode.org.
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68231
2015-04-24 19:56:22lemburgsetmessages: + msg241977
2015-04-24 19:47:42Behdad.Esfahbodsetmessages: + msg241976
2015-04-24 19:39:28serhiy.storchakasetmessages: + msg241975
2015-04-24 19:28:47Behdad.Esfahbodsetmessages: + msg241974
2015-04-24 19:25:10serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg241973
2015-04-24 19:08:24Behdad.Esfahbodsetmessages: + msg241971
2015-04-24 11:31:23lemburgsetmessages: + msg241933
2015-04-23 20:19:16ned.deilysetnosy: + lemburg, loewis
2015-04-23 19:02:04Behdad.Esfahbodcreate