[Fluxus] unicode

Dave Griffiths dave at pawfal.org
Wed Feb 10 05:57:44 PST 2010


Hi all,

I've converted all the string code in the scratchpad application to
unicode.

Text files and text from mzscheme is converted from utf-8 into utf-32
internal representation, and all output back into utf-8. This means that
multibyte characters can now be edited normally (rather than the cursor
disappearing in the middle of them), and should be displayed assuming
the font contains a glyph for them.

The problem is keyboard input, which glut seems to squash into a single
byte for the one multibyte key I can find on my keyboard (£) could
someone test this a bit more?

Portuguese characters seem to now work in the console help properly.

This is quite a big change, for those want to play with the scratchpad,
be aware that you have to use wstring everywhere and declare string
constants L"like this". Although the wchar_t is 4 bytes on linux (and
probably/I hope OSX too) its 2 bytes long on windows - so don't
de-reference these pointers directly.

cheers,

dave




More information about the Fluxus mailing list