classification
Title: Add support of the cp1125 encoding
Type: enhancement Stage: resolved
Components: Unicode Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, ezio.melotti, haypo, lemburg, loewis, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-11-20 19:35 by serhiy.storchaka, last changed 2014-03-10 01:35 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
encoding_cp1125.patch serhiy.storchaka, 2013-11-20 19:35
Messages (12)
msg203523 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-20 19:35
The proposed patch adds support of the CP1125 encoding.

The CP1125 encoding (also known as IBM866, CP866U (in Microsoft), 866nav (in TeX), RUSCII) is standard DOS encoding for Ukrainian language. It is only one DOS encoding (or at least most popular) suitable for Ukrainian. It is Ukrainian government standard for DOS. The CP1125 encoding differs from CP866 encoding only in 6 codes for Ukrainian letters.

http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp01125z.pdf
http://cp866u.codeplex.com/
ftp://tug.org/texlive/Contents/live/texmf-dist/tex/latex/cyrillic/cp866nav.def
http://segfault.kiev.ua/cyrillic-encodings/#ruscii
msg203558 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2013-11-21 02:15
See also issue #19459.
msg203559 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2013-11-21 02:19
> The proposed patch adds support of the CP1125 encoding.

Nowadays, a good motivation for supporting a new codec is to be able to start Python 3. For example, I added cp65001 because some using try Python 3 with this Windows code page.

It looks like at least one user is unable to start Python 3 because he/she uses GEORGIAN-PS as the locale encoding (issue #19459).

For cp1125: is it used as the ANSI code page on Windows? Otherwise, how do you use this encoding.

Supporting all encodings in the world is meaningless because they are too many encodings.
msg203584 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-21 08:34
No, it is not official Microsoft codepage (it was introduced by IBM in its PC-DOS). AFAIK this encoding yet widely used in banking software. My old text files were written in this encoding, ;)
msg203594 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2013-11-21 09:24
On 21.11.2013 09:34, Serhiy Storchaka wrote:
> 
> No, it is not official Microsoft codepage (it was introduced by IBM in its PC-DOS). AFAIK this encoding yet widely used in banking software. My old text files were written in this encoding, ;)

+1 for adding this. It gets enough Google hits to be worth adding.

Please also add the aliases you mentioned.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com
msg203598 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-21 09:43
> Please also add the aliases you mentioned.

I have already added these aliases.

I should remove added in last moment the 'cp866nav' alias from Lib/encodings/aliases.py because it is actually a little different encoding (it have two Byelorussian letters "Ўў" instead cp866 characters "·√" at positions 0xfa-0xfb).
msg204010 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-23 13:38
So what is a decision?
msg204047 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2013-11-23 16:32
+1
msg204056 - (view) Author: Roundup Robot (python-dev) Date: 2013-11-23 17:09
New changeset d0fd68ef1aa9 by Serhiy Storchaka in branch 'default':
Issue #19668: Added support for the cp1125 encoding.
http://hg.python.org/cpython/rev/d0fd68ef1aa9
msg204059 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-23 17:21
Thanks all.
msg204064 - (view) Author: Roundup Robot (python-dev) Date: 2013-11-23 17:51
New changeset 355d8950f574 by Serhiy Storchaka in branch 'default':
Fixed incorrectly applying a patch for issue19668.
http://hg.python.org/cpython/rev/355d8950f574
msg213009 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-10 01:35
New changeset 11bc9f669015 by R David Murray in branch 'default':
whatsnew: cp1125 codec (#19668).
http://hg.python.org/cpython/rev/11bc9f669015
History
Date User Action Args
2014-03-10 01:35:04python-devsetmessages: + msg213009
2013-11-23 17:51:15python-devsetmessages: + msg204064
2013-11-23 17:21:45serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg204059

stage: patch review -> resolved
2013-11-23 17:09:33python-devsetnosy: + python-dev
messages: + msg204056
2013-11-23 16:32:26loewissetmessages: + msg204047
2013-11-23 13:38:38serhiy.storchakasetmessages: + msg204010
2013-11-21 09:43:18serhiy.storchakasetmessages: + msg203598
2013-11-21 09:24:42lemburgsetmessages: + msg203594
2013-11-21 08:34:12serhiy.storchakasetmessages: + msg203584
2013-11-21 02:19:06hayposetnosy: + loewis
messages: + msg203559
2013-11-21 02:15:24hayposetmessages: + msg203558
2013-11-20 19:35:02serhiy.storchakacreate