;;; Non-ASCII input ;;; ;;; Out-of-the-box, McCLIM only supports ASCII input. If you use the CLX backend (most likely the ;;; default for your platform), you can use the following trick to enable more characters. ;;; ;;; You must redefine the clim-clx::translate function: (in-package :clim-clx) (defun translate (src src-start src-end afont dst dst-start) (let ((min-char-index (xlib:font-min-char afont)) (max-char-index (xlib:font-max-char afont))) (if (stringp src) (loop for i from src-start below src-end for j from dst-start for index = (char-code (aref src i)) while (<= min-char-index index max-char-index) do (setf (aref dst j) index) finally (return i)) (loop for i from src-start below src-end for j from dst-start for index = (if (characterp (aref src i)) (char-code (aref src i)) (aref src i)) while (<= min-char-index index max-char-index) do (setf (aref dst j) index) finally (return i))))) ;; ;; Without this function, the CLX backend is incapable of handling Unicode characters. ;; ;; ;; Use this function to add the characters you need: ;; (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-swedish-input () "Adds Swedish special characters." (fix-character #\? 229) (fix-character #\? 197) (fix-character #\? 228) (fix-character #\? 196) (fix-character #\? 246) (fix-character #\? 214)) ;; ;; For example: ;; (defun fix-danish-input () "Adds Danish special characters." (fix-character #\? 230) (fix-character #\? 198) (fix-character #\? 248) (fix-character #\? 216) (fix-character #\? 229) (fix-character #\? 197)) ;; Or: (defun fix-german-input () "Adds German special characters." (fix-character #\? 228) (fix-character #\? 246) (fix-character #\? 252) (fix-character #\? 196) (fix-character #\? 214) (fix-character #\? 220) (fix-character #\? 223)) ;; You should now have non-ASCII input. In editor-panes, at least.