[Xmonad] Non-English letters in XPrompt?

Andrea Rossato mailing_list at istitutocolli.org
Wed Sep 12 06:29:30 EDT 2007

On Sat, Sep 08, 2007 at 09:51:29AM -0400, Xiao-Yong Jin wrote:
> I'm using `en_US.UTF-8'.  And it's a utf8 font.

Ok, I'm getting there. Almost ready to send a few patches.

I think that the only viable approach is the one suggested by Mats:
the use of locale technology. This requires importing with the FFI:

1. setlocale()
2. X(mb/wc)DrawImageString
3. X(mb/wc)TextEscapement

then a few functions included in Mats patches:
1. XwcDrawString and XwcTextExtents
2. XCreateFontSet, XFreeFontSet, and the FontSet structure.

I need to have some directions from Dons and Spencer here, since this
requires some additions to X11-extras. But still there's that
setlocaole stuff. If I included it in XPrompt, XPrompt.hs becomes
XPrompt.hsc and must be inclued in xmonad.cabal for ghc to process
it with hsc2hs. I don't know...

I still have some problems in dealing properly with directory/file
names when they contain non ascii characters, though. I can display
them correctly but they are seen, on the Haskell side, as multiple
single byte characters, so "length" returns wrong numbers.


More information about the Xmonad mailing list