[Python-Dev] Allowing Unicode literals even without Unicode support?

M.-A. Lemburg mal@lemburg.com
Mon, 27 May 2002 10:58:00 +0200


Michael Hudson wrote:
> Anyway, I've been meaning to post here about --disable-unicode builds
> for a while, so here's some issues that currently exist.
> 
> 1) In --disable-unicode builds, it seems that much of the codec
> machinery just doesn't exist.  While this was fine once, we now have,
> e.g.

I'm not sure I understand: the charmap codec is built around Unicode
so it could never have worked with --disable-unicode.

>>>>"sheesh".encode("rot-13")
>>>
> 'furrfu'
> 
> But in a disable unicode build:
> 
> 
>>>>"sheesh".encode("rot-13")
>>>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/home/mwh/src/python/dist/src/Lib/encodings/rot_13.py", line 18, in encode
>     return codecs.charmap_encode(input,errors,encoding_map)
> AttributeError: 'module' object has no attribute 'charmap_encode'
> 
> This is why test_string still fails.
> 
> I'm not sure what to do about this.

Make the test conditional in test_string ?!

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/