Issue1813837

classification
Title: patch to add Japaneze codecs
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, nhiro
Priority: normal Keywords: patch

Created on 2007-10-15.13:46:16 by nhiro, last changed 2007-12-02.00:12:53 by cgroves.

Files
File name Uploaded Description Edit Remove
add_japanese_codecs.patch nhiro, 2007-10-15.13:46:16 patch to add Japanese codecs
Messages
msg2924 (view) Author: NISHIO Hirokazu (nhiro) Date: 2007-10-15.13:46:16
I wrote Japanese codecs for Jython2.2.1
The attached patch includes following 6 files.

 * encoding/shift_jis.py
 * encoding/euc_jp.py
 * encoding/iso2022_jp.py
 * encoding/ms932.py
 * encoding/bridge_to_java.py
 * test/test_japanese_codecs.py

I didn't change any existing scripts.
I tried to run 'jython dist/Lib/test/regrtest.py -a'
but it doesn't finish.
It may be caused from lack of my disk-space.
I executed "jython CPythonLib\test\test_japanese_codecs.py" directly and
confirm it doesn't make error.
msg2925 (view) Author: Charlie Groves (cgroves) Date: 2007-12-02.00:12:53
I applied this to the 2.2 branch in r3747, so it'll appear in the 2.2.2 release.  I added error handling support to the java bridge in addition to what was already in the patch, so setting replace and ignore works now.  Unfortunately, the user defined error handling functions added to Python 2.3 require more information and control over the encoding process than Java's error handling hooks provide, so this can't be directly applied to trunk and some more work will need to be done to keep Japanese codec support going forward.  Probably the easiest course of action is to pull over a version of this code that just rejects non-builtin error handling types.
History
Date User Action Args
2007-10-15 13:46:16nhirocreate