On Sat, 07 Jul 2007 16:06:03 +0000, [EMAIL PROTECTED] wrote:

> Hi to all, I have a little problem with unicode handling under Python.
> 
> I have this code
> 
> s = u'A unicode string with this damn apostrophe \x2019'
> 
> outf = codecs.open('filename.txt', 'w', 'iso-8859-15')
> outf.write(s)
> 
> what I obtain is a UnicodeEncodeError that says me that character \x2019
> maps to undefined.
> 
> But the character \x2019 is the apostrophe and in the unicode table it has
> \x0027 as an equivalent, so the codecs should convert \x2019 to \x27 ( as
> defined in iso-8859-15 )....

No it shouldn't because \x2019 is a "right single quotation mark" and not
an apostrophe.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to