string.encode on HP-UX

Richard Townsend richardt at edshk.demon.co.uk
Fri Jul 23 04:09:22 EDT 2004


In article <Pine.LNX.4.44.0407221014000.30237-100000 at ccc2.wpi.edu>,
Christopher T King <squirrel at WPI.EDU> writes

>Oops, I had only tested it at the prompt :P I had assumed sitecustomize.py 
>was run after everything was set up.
>
>This code uses a more defined interface for altering the codecs registry, 
>uses 'ascii' instead of 'latin_1' (to prevent some confusion), and 
>I've actually tested it in sitecustomize.py:
>
>import codecs
>
>def roman8(n):
>    if n=='roman8':
>        return codecs.lookup('ascii')
>
>codecs.register(roman8)
>
>This achieves the same effect as the aliases trick (which I'm surprised 
>didn't work for you at the prompt), but is less tricksy and should 
>therefore work better.
>

Hi Christopher,

Thanks for your new suggestion. I have tested it on HP-UX and it doesn't
raise the exception anymore.

regards,
Richard



-- 
Richard Townsend



More information about the Python-list mailing list