python / cpython

The Python programming language
https://www.python.org
Other
62.36k stars 29.95k forks source link

Support for cp858 #52264

Closed 20a86718-de16-47cc-96fd-41418eaa4cf9 closed 14 years ago

20a86718-de16-47cc-96fd-41418eaa4cf9 commented 14 years ago
BPO 8016
Nosy @malemburg, @birkenfeld, @vstinner, @benjaminp, @thatch
Files
  • cp858.diff: Diffs to create cp858.{txt,py} from cp850.{txt,py}
  • cp858.diff: Diffs to create cp858.{txt,py} from cp850.{txt,py} (v2)
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = 'https://github.com/benjaminp' closed_at = created_at = labels = ['type-feature', 'library'] title = 'Support for cp858' updated_at = user = 'https://github.com/thatch' ``` bugs.python.org fields: ```python activity = actor = 'georg.brandl' assignee = 'benjamin.peterson' closed = True closed_date = closer = 'georg.brandl' components = ['Library (Lib)'] creation = creator = 'thatch' dependencies = [] files = ['16366', '17301'] hgrepos = [] issue_num = 8016 keywords = ['patch'] message_count = 6.0 messages = ['100081', '105550', '106299', '106313', '106385', '106395'] nosy_count = 5.0 nosy_names = ['lemburg', 'georg.brandl', 'vstinner', 'benjamin.peterson', 'thatch'] pr_nums = [] priority = 'high' resolution = 'fixed' stage = 'patch review' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue8016' versions = ['Python 3.2'] ```

    20a86718-de16-47cc-96fd-41418eaa4cf9 commented 14 years ago

    Based on codepage 850, codepage 858 adds support for the euro symbol1. This codepage is used on many thermal receipt printers, such as the Epson TM-T88IV and NCR 7198 as the only way to print a euro. There is no CP858.TXT on the unicode.org ftp, so I've attached the diff of the TXT file to create it from CP850, as well as the diff for cp858.py against cp850.py.

    The codepage is supported by java2 and by iconv3, and it'd be nice if future versions of python could support this natively.

    Let me know if there's a better way to provide a fix.

    20a86718-de16-47cc-96fd-41418eaa4cf9 commented 14 years ago

    Uploading corrected diff -- the old one missed a couple of instances of DOTLESS I -> EURO.

    birkenfeld commented 14 years ago

    Benjamin: OK to put this in 2.7?

    20a86718-de16-47cc-96fd-41418eaa4cf9 commented 14 years ago

    I also noticed that libforensics supplies a codec for cp858, if that's helpful to double-check the implementation. http://code.google.com/p/libforensics/source/browse/code/lf/win/codepage/cp858.py

    benjaminp commented 14 years ago

    A new codec is quite self-contained, so that's ok.

    birkenfeld commented 14 years ago

    Thanks all, committed in r81499.