From: SourceForge.net <no...@so...> - 2006-05-11 20:01:36
|
Bugs item #551888, was opened at 2002-05-03 15:24 Message generated for change (Settings changed) made by fwierzbicki You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=551888&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library Group: Deferred Status: Open Resolution: Works For Me >Priority: 4 Submitted By: Lars Marius Garshol (larsga) Assigned to: Finn Bock (bckfnn) Summary: Opening utf-8 files with codecs fails Initial Comment: Something strange happens when I try to read utf-8-encoded files with Jython. import codecs codecs.open(anyfile, "r", "utf-8") throws a Java ArrayIndexOutOfBoundsException, always, for any file. ---------------------------------------------------------------------- Comment By: Lars Marius Garshol (larsga) Date: 2002-09-20 11:37 Message: Logged In: YES user_id=39120 If I try to do the same I get the following: Jython 2.1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import codecs >>> codecs.open("dd", "r", "utf-8") >>> codecs.open("tst.py", "r", "utf-8") Traceback (innermost last): File "<console>", line 1, in ? File "/usr/local/java/jython-2.1/Lib/codecs.py", line 503, in open java.lang.ArrayIndexOutOfBoundsException at org.python.core.imp.createFromPyClass(imp.java) at org.python.core.imp.loadFromPath(imp.java) at org.python.core.imp.loadFromPath(imp.java) This is on RedHat Linux 7.1 with [larsga@pc36 gedcom]$ java -version java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) ---------------------------------------------------------------------- Comment By: Finn Bock (bckfnn) Date: 2002-05-30 19:47 Message: Logged In: YES user_id=4201 Added as test361. Seems to work for both 2.1 and current CVS: Jython 2.1 on java1.4.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import codecs >>> codecs.open("dd", "r", "utf-8") <codecs.StreamReaderWriter instance at 836584> >>> Do you have a java stacktrace? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=551888&group_id=12867 |