UTF-8 Support in the Shell

Even though Apple’s Terminal application has UTF-8 as the default encoding, they did not setup the shell to support it fully.

Mietek Bąk did a good write-up on the steps required to make Terminal (and the shell) fully UTF-8 aware, it also includes a note about irssi (for the records, the default encoding in ##textmate is UTF-8, and we use unicode glyphs a lot).

While speaking of Terminal, let me link to my old piece on how to make ⌥← and ⌥→ do word movement in Terminal and how to make and move caret (that was the page up/down glyphs).

4 Comments

  1. 26 Oct 2006 | # Roshambo wrote…

    Your old piece about word movement in Terminal has changed my life. Really. Thanks so much for that.

  2. 27 Oct 2006 | # mathie wrote…

    Hmm, I couldn't see any way of contacting Mitek directly, so I'll post the comment here instead:

    Regarding your article on getting UTF-8 support in screen, I think that you can put the following in ~/.screenrc:

    defencoding UTF-8
    

    which will set the default encoding for windows to UTF-8 and save you having to remember to pass in '-U'. At least it seems to work for me.

  3. 27 Oct 2006 | # LabRat wrote…

    Thanks so much for sharing the tip. Got Japanese to work properly in iTerm for the first time ever.

    I know it's a bit of a taboo subject but I wonder how TextMate 2.0 is coming along and if support for multi-byte characters is on the near horizon.

    I don't think anybody expects to write actual code in Japanese or even Arabic but it is needed for commenting code (reading and writing) and rendering strings for labels and such. Would be nice if multi-byte characters just use regular NSTextView or whatever if that's a feasible solution.

    I didn't buy TextMate for this but it is nice to have and am well aware of the challenge posed by encoding based on your previous elaborations for a brilliant award-winning Cocoa developer.

  4. 27 Oct 2006 | # Mietek Bąk wrote…

    Mathie, thank you for your comment. Unfortunately, certain versions of screen do require the '-U', even if the default encoding is set properly.

Comments closed, you can use the mailing list for discussion.