bug 153, 1066: Convert XBEL bookmarks to/from UTF-8.
commit73f925ce21bd0b5f48d2d3affb1d51c06d2fd565
authorKalle Olavi Niemitalo <kon@iki.fi>
Sun, 4 Jan 2009 11:59:04 +0000 (4 13:59 +0200)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sun, 8 Feb 2009 16:26:04 +0000 (8 18:26 +0200)
tree43ef3b18bada749b18e20aa5321799d830d87889
parent8c0ae2a215fa5ec9b5136f607a4630dbf82fa7bd
bug 153, 1066: Convert XBEL bookmarks to/from UTF-8.

When the file is being read, Expat provides the strings to ELinks in
UTF-8, so ELinks can put them in struct bookmark without conversions.
Make sure gettext returns any placeholder strings in UTF-8, too.
Replace '\r' with ' ' in bookmark titles and URLs.

When the file is being written, put encoding="UTF-8" in the XML
declaration, and then write out the strings from struct bookmark
without character set conversions.  Do replace some characters
with entity references though, by calling add_html_to_string().
src/bookmarks/backend/xbel.c
src/bookmarks/bookmarks.c
src/intl/gettext/libintl.h