[Greasemonkey] Character encoding issues with GM_setValue
Mark Pilgrim
pilgrim at gmail.com
Thu Jun 2 14:50:04 EDT 2005
One of the scripts I'm working on downloads RSS/Atom feeds and caches
them with GM_setValue. Downloading them works OK (i.e. parsing the
responseText with DOMParser produces the correct DOM tree of the
feed), but when I read them back with GM_getValue I get
"non-wellformed XML" errors. I suspect that the issue is one of
character encoding; the values stored in the Firefox preferences
database don't handle character encoding properly. Is this a known
issue, and if so, is it fixable within GM or is there a workaround I
could try?
I get the same results storing things like document.title with
GM_setValue; if the title contains high-bit characters (example:
http://tbray.org/ongoing/ ) then the value gets munged when it's
stored. about:config shows the raw value as terminating at the first
high-bit character.
--
Cheers,
-Mark
More information about the Greasemonkey
mailing list