[Zope-DB] Unicode - ISO 8859-1 conversion

Andreas Jung lists at zopyx.com
Fri Jun 2 06:19:26 EDT 2006

--On 2. Juni 2006 12:08:09 +0200 Jonas Nielsen <jonasn at mail.tele.dk> wrote:

> I have a MySQL database with text in ISO 8859-1. However Plone displays
> strings in UTF-8.
> I am looking for a function to convert between ISO 8859-1 and unicode. (I
> am /not/ looking for a way to change how the strings are stored in MySQL
> or how to change the encoding of an entire html page).

Python unicode strings have an encode() Method. For converting to a unicode
string you want to use the unicode() method of Python...the Python doc is 
your friend.


ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-db/attachments/20060602/a409cc62/attachment.bin

More information about the Zope-DB mailing list