Python2.0: Unicode/string.letters inconsistency 
Author Message
 Python2.0: Unicode/string.letters inconsistency

I have a problem with a Unicode/string.letters inconsistency:

  During "xslt" processing, a unicode string is passed to
  "urlpath.urlpath". This fails with the famous

     UnicodeError: ASCII decoding error: ordinal not in range(128)

  The reason:

    "string.letters" contains not only the ASCII letters but
    all "ISO-8859-1" letters.

    "string.letters" is used in "urlparse" to build
    "scheme_chars" against with the URL characters are
    compared. "scheme_chars" cannot be coerced in a Unicode
    string, as it contains non ASCII characters -> the exception.

In my view, it is inconsistent to disallow default unicode
encoding/decoding for non-ASCII characters but place
non-ASCII characters in such a central place as "string.letters".

Dieter



Thu, 22 May 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Unicode support inconsistency between menu titles and menu items on Windows

2. Tkinter wart: returned texts are sometimes strings, sometime Unicode strings

3. unicode strings and strings mix

4. string.split and re.split inconsistency

5. Python and Jython inconsistencies when encoding strings

6. BUG: Tcl8.0b2 split and binary strings bug/inconsistency

7. dl + getenv (without arguments) = segfault (python2.p2, python2.3)

8. convert hex #'s and letters to one string constant

9. Count letter in string

10. wxPython redefines string.letters?

11. Unicode strings

 

 
Powered by phpBB® Forum Software