Monthly Archives: April 2010

gbookmark2delicious 3.0

gbookmark2delicious is a simple command-line tool that will synchronize your Delicious account against your Google Bookmarks account, effectively enabling a public feed for your Google Bookmarks. I recently rewrote it to work again (the new Google Bookmarks broke the old code), introduced bulk export and import for substantially improved performance, and ironed out encoding quirks/differences between the two services.

Not too long ago, Google Bookmarks introduced Lists, which got me excited because I thought they were a way to publish bookmark feeds, which would allow me to retire gbookmark2delicious. It turned out to be pretty different—Lists generate a feed for any updates to the pages in the List. (Plus, adding new bookmarks requires that it be explicitly added to the List, and the bookmarklet for doing so is IMO less usable than the regular Google Bookmarks bookmarklet.)

Continue reading

Locale-sensitive IO encoding in GHC 6.12

One thing to watch out for in the latest versions of GHC (6.12) is the new locale-sensitive text IO. For instance, when using EasyFilter to render Pandoc documents in WordPress, you must make sure you set the LANG environment variable to en_US.UTF-8 (e.g. in /etc/apache2/envvars), or it will typically default to POSIX and thus cause Pandoc to crash whenever it reads a non-ASCII character:

pandoc: <stdin>: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)

or writes one:

pandoc: <stdout>: commitAndReleaseBuffer: invalid argument (Invalid or incomplete multibyte or wide character)