[Rpm-metadata] updates
Joe Shaw
joe at ximian.com
Fri Oct 24 19:24:49 UTC 2003
On Fri, 2003-10-24 at 11:40, Daniel Veillard wrote:
> Hum, seems that libxml2 error message got inserted at the beginning
> of the XML result:
Yeah, even removing that, though, I get this:
[joe at bacon joe]$ xmllint fedora-core-test2-metadata.xml
fedora-core-test2-metadata.xml:10061: error: Input is not proper UTF-8,
indicate encoding !
And it shows the registered mark and trademark lines (for some reason
Evo won't paste them).
Anyway, they're the Latin-1 trademark symbols, not the UTF-8 ones.
(ASCII is a subset of UTF-8, but Latin 1 isn't)
In python (>= 2.1 anyway) you can encode string as UTF-8 by doing:
string = "blah blah ®" (some latin 1 encoded string)
utf8_string = string.encode('utf-8')
and then write that out to the disk.
Joe
More information about the Rpm-metadata
mailing list