Big Bubbles (no troubles)

What sucks, who sucks and you suck

Turning Your Back on the World

Back when I installed Red Hat 9, I mentioned some Unicode-related problems with GTK+ 1.x apps. Following another upgrade to Fedora Core 1 (mostly painless, but once again I had my carefully customised and working CUPS configuration broken), I managed to get to the bottom of this. It’s not pretty (in fact, with the wrong font, it’s downright ugly).

To run applications with Unicode, you need three things: 1. A Unicode-aware app; 2. A Unicode locale set in your environment (e.g. en_GB.UTF-8); 3. A Unicode font. My GTK+ apps had the first two but not the last, which is why all the text came out with strange block characters interleaved in it. This turned out to be because a non-Unicode font had been specified in a rogue .gtkrc file left in my home directory by an old version of the KDE theme manager. Removing this file, or fixing the font spec to a Unicode equivalent (one with “iso10646” in the registry field - use xfontsel(1) to find these), resolved the problem.

The other related issue I had with Fedora was getting a normal w3m(1) display. Odd characters would appear in place of graphic lines or in the prompt string. It turns out that Fedora builds the w3m-0.4.1 RPM with the m17n multi-lingualized patch, which adds Unicode capabilities that are enabled by default. Hence, to run it in this mode, you need the prerequisites listed above. In this case, that means starting xterm -u8 (or the GNOME or KDE terminal programs) with a Unicode locale and font. Running w3m in this window makes the odd characters in the prompt resolve to: « ↑ ↓ (if those three characters look odd, your browser isn’t using a Unicode-enabled font).

If you’d rather avoid this faff, go into the w3m options screen, scroll to the bottom and set all the charset parameters to a non-Unicode locale (e.g. Latin-9). (Note that w3m post-0.4.2 will have the m17n patch merged.)

Armed with this new, dangerous knowledge, I was all set to convert my system to Unicode. Then I realised that I still lacked a fourth requirement: motivation. Why did I need Unicode? I wasn’t Japanese, I didn’t need any more odd characters in my life (especially not ☺) and, more to the point, my standard X11 term is rxvt, which isn’t yet Unicode-capable (although there are patches and forks that provide this). So I decided to sack it and go with what (currently) works. If Unicode ever becomes the standard, I’ll be forewarned. In the meantime, start migrating your font configurations to Unicode-enabled versions (Xft is your Friend).


Other bubbles: * Unicode HOWTO - slightly out of date. * Unicode Mutt - some good general info on setting things up. * All about Fonts in XFree86.