[Patches] [ python-Patches-490920 ] Jython and test_unicode

noreply@sourceforge.net noreply@sourceforge.net
Mon, 10 Dec 2001 04:46:54 -0800


Patches item #490920, was opened at 2001-12-09 12:23
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=490920&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Finn Bock (bckfnn)
>Assigned to: Finn Bock (bckfnn)
Summary: Jython and test_unicode

Initial Comment:
Skipping some tests by adding the usual jython 
conditional test around:

- the repr of unicode. Jython only add the u'' if the 
string contains char values > 255.
- A unicode arg to unicode() is perfectly valid in 
jython.
- A test buffer() test. No buffer() on Jython.

----------------------------------------------------------------------

>Comment By: M.-A. Lemburg (lemburg)
Date: 2001-12-10 04:46

Message:
Logged In: YES 
user_id=38388

Ok. I've assigned this to back to you, Finn. Please check it in.

Thanks.

----------------------------------------------------------------------

Comment By: Finn Bock (bckfnn)
Date: 2001-12-10 04:22

Message:
Logged In: YES 
user_id=4201

Jython have only one string type, so we can't differentiate 
between a string argument and an unicode argument. Instead 
we just trust that the argument to unicode() is a string 
that only contain a valid encoded sequence and throw an 
exception when it isn't the case.

>From a type purity point of view, this is a bad design. But 
it works and I still think it is better than adding a 8bit 
string type just to be backward compatible with python.



----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2001-12-09 14:37

Message:
Logged In: YES 
user_id=38388

Why should decoding Unicode into Unicode using an UTF-8 encoding assumption be valid ?

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2001-12-09 13:12

Message:
Logged In: NO 

Looks OK.

(Guido, not logged in.)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=490920&group_id=5470