Stupid i18n Mistake.

Monday, May 21, 2007

Italian, apparently, is full of single quotes. I'm sure they’re not called “single quotes” in Italian, and I'm sure that the Italian people didn’t have exactly my code in mind when they settled upon that convention… That said, my broken code is still obviously their fault.

Note to self: Escape all quotes. At a minimum, do something like:

$title =~ s/\'/\\\'/g;

before writing out strings for use later. Potentially even use correct typography with code like:

$title =~ s/\'/’/g;

depending on context.

This entry was published on Monday, May 21, 2007. Articles published around the same time can be found in the archive.

Further reading: If you enjoyed this post, you might like to take a look at some of my other posts about ’, or ’. I've also made available a list of all the topics I've written about if you're interested in my (folkless) folksonomy.