ElementTree and Unicode

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Wed Aug 2 13:45:07 EDT 2006


In <1154532671.351968.142890 at b28g2000cwb.googlegroups.com>, Sébastien
Boisgérault wrote:

> I am trying to embed an *arbitrary* (unicode) strings inside
> an XML document. Of course I'd like to be able to reconstruct
> it later from the xml document ... If the naive way to do it does
> not work, can anyone suggest a way to do it ?

Encode it in UTF-8 and then Base64.  AFAIK the only reliable way to put an
arbitrary string into XML and get exactly the same string back again.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list