[mcclim-devel] Re: Command and non-ASCII problems

Troels Henriksen athas at sigkill.dk
Mon Jan 2 10:53:35 UTC 2006


Milan Zamazal <pdm at zamazal.org> writes:

> Look for "non-ASCII" in the mailing list archive, June 2005.  I've found
> a working Q&D way to input and display Czech characters in McCLIM using
> a Unicode font.

Thank you. Based on your post, I was able to write some functions that
solve the problem in a very simple way:

(defun fix-character (character keysym)
  "Setup character to work in CLX and McCLIM."
  (xlib::define-keysym character keysym)
  (goatee::add-gesture-command-to-table character 'goatee::insert-character
                                       goatee::*simple-area-gesture-table*))

(defun fix-danish-input ()
  (fix-character #\æ 230)
  (fix-character #\Æ 198)
  (fix-character #\ø 248)
  (fix-character #\Ø 216)
  (fix-character #\å 229)
  (fix-character #\Å 197))

I also had to replace clim-clx::translate with the Unicode-capable
translation function from Climacs.

I think this fix should be mentioned somewhere, since non-ASCII input
is likely to be important to many people. Also, could this method be
used as a general solution, or is it still a hack (apart from the low
number of supported characters, of course)?

-- 
\  Troels "Athas" Henriksen
/\ sigkill.dk/blog (Danish)



More information about the mcclim-devel mailing list