QZ qz thoughts
a blog from Eli the Bearded
Page 3 of 146

UTF-8 Fixes

It looks like there will only be documentation fixes to the bug I filed about the open pragma not working with the FileHandle module. The pragma lets you specify the expected encoding of all files being open()ed. The FileHandle module provides an alternative syntax for open(). The original blosxom code used that alternative syntax. So depending on the code path, the expected encoding was one thing or another.

I've patched blosxom again to not use FileHandle and specify all UTF-8 input. Net result is two fewer lines of code, because I can use "goes out of scope" to automatically close file handles now. That didn't work with one global $fh. One of Rael Dornfest's original points of pride about Blosxom is how few lines of code were used to implement it, so I feel good about this patch.

(Most people don't care about how many lines of code are used; particularly when it means skimping on features. But it certainly worked for me.)

Along with this change, my /qz/plugins/flavour_dir was modified significantly to match. It originally was based on Blosxom's own template reader, so it had the same use FileHandle issue. I made slight changes to a couple of other plugins to ensure UTF-8 handling, too, but those are minor.

Now I can have a link to the UTF-8 post like so:

without having the UTF-8 check character come out as mojibake.