[mcclim-devel] mcclim and Umlaute?
Friedrich Dominicus
frido at q-software-solutions.de
Mon May 30 05:41:03 UTC 2005
Christophe Rhodes <csr21 at cam.ac.uk> writes:
> Friedrich Dominicus <frido at q-software-solutions.de> writes:
>
>> sorry, I have not idea what mcclim does with German Umlauts.
>> I'm using sbcl with :sb-unicode in the *features* list but if there
>> e.g a À or even a § in a text, I will be thrown into the debugger.
>
> On the assumption that you're using the CLX backend, I think the
> relevant piece of code is the default :TRANSLATE function in clx.
Yes I use CLX and I found the relevant pieces e.g:
#-unicode
(defun translate (src src-start src-end afont dst dst-start)
;; This is for replacing the clx-translate-default-function
but also
; Yes, the following is a nasty hack.
; It's just a proof of concept, I'll try not to commit it :]
; If it does get committed, it shouldn't affect anyone much...
#+unicode
(defun translate (source source-start source-end initial-font destination destination-start)
; do the first character especially
(let* ((code (char-code (char source source-start)))
(result (fontset-point code)))
in medium.lisp in
McCLIM/Backends/CLX/
well my featurs list says that :sb-unicode is part of it but not
:unicode.
However something is there and I'm now wondering:
a) wether to use it
b) if that is sufficient
>
>> What do I have to do to make Umlauts running with SBCL?
>
> Take a look at translate.lisp in climacs CVS, and see if that can be
> adapted to your needs.
Must be sitting around here somewhere.
>
> (Note: the issue is more complex than this simple "solution" might
> imply. I'm assuming that you don't actually want to think about the
> complexity of managing font sets with differing encodings, but please
> don't let me stop you.)
I was afraid that that's the case and asked therefor if someone more
in "CLIM" has an idea. I'm just starting to learn it and well at the
moment I have a rough understanding on how it works. But there are so
many functions, macros etc, that it's a long way to go till I get a
base understanding...
Besides it seems that McCLIM /= CLIM in some aspects.
Just one example this compiles and works in McCLIM
(define-command-table file-menu
:inherit-from '(user-command-table)
:menu (("Load" :command com-load-account)
("Quit" :command com-quit-application)))
but LWs CLIM accepts that too but while starting the application I
got:
(main)
Error: Command table NIL not found
1 (abort) Return to level 0.
2 Return to top loop level 0.
That's really encouriging, because:
(find-command-table 'USER-COMMAND-TABLE)
#<STANDARD-COMMAND-TABLE USER-COMMAND-TABLE 21F0D66C>
but of course something here might be wrong for LW-CLIM
(define-application-frame clim-account ()
((current-account :initform nil :accessor current-account)
(interaction-pane))
(:pointer-documentation :t)
(:menu-bar
(("File" :menu file-menu)))
(:panes
(interactor :interactor)
(actual-account :application
:incremental-redisplay t
:display-function #'display-current-account)
(accounts :application
:incremental-redisplay t
:display-function #'display-accounts))
(:layouts
(default
(vertically ()
(horizontally ()
actual-account accounts)
interactor))))
which seems to be fine for McCLIM.
So the C in CLIM seems to be a overoptimistic....
but that's a different story....
Regards
Friedrich
More information about the mcclim-devel
mailing list