[Python-Dev] test_quopri is iso-latin-1 centric

Jack Jansen jack@oratrix.nl
Fri, 03 Aug 2001 12:44:51 +0200


I think test_quopri is too latin-1 centric. Alternatively, I'm mistaken, 
please enlighten me (is quopri supposed to convert to/from latin1, in stead of 
to/from local convention, as I expect?).

What happens is the following. The test_quopri.py source contains lots of 
special characters, for instance the spanish-upsidedown-exclamation (to 
mention the first one). It converts this with quopri and expects to see =A1.

This all works fine if your Python source is interpreted in latin-1, but it 
fails for other encoding.

For instance, on my Mac, Python source is in MacRoman encoding. CVS knows all 
about this, so it happily converts the latin-1-upsidedown-exclam to a 
macroman-upsidedown-exclam, and if I look at the source code I see the same 
glyph as I see on Unix.

However, the MacRoman encoding for this character is =D1, so test_quopri fails.

I'm surprised the test doesn't fail on Windows as well, or do Windows 
pythonistas generally work with source in latin1?
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | ++++ see http://www.xs4all.nl/~tank/ ++++