getting weird polish letters with diacritics to show up ok e.g. [aogonek]
"Ben Wing" <[email protected]> Sat, 17 May 2003 02:19:35 -0700
| Newsgroups | gmane.emacs.xemacs.mule |
|---|---|
| Message-ID | <00e501c31c55$6fb1ff80$0201a8c0@neeeeeee> |
hrvoje -- martin referred me to you as someone who got things to work automatically under Croatian when handling the keys producing latin-2 or whatever keysyms. Obviously the correct thing would be for the X spec to give us numbers from well-defined standards rather than names, but whatever ... evidently we need a big table on the C level, mapping all sorts of names to some internal equivalent. others don't really grok the keysym handling code. could you try to elaborate on how it works and what you think needs to be done (and how), and what gotchas to whatch out for? thanks muchly, ben ----- Original Message ----- From: "Martin Buchholz" <[email protected]> To: "Ben Wing" <[email protected]> Cc: "Jakub Nadolny" <[email protected]>; "Stephen J. Turnbull" <[email protected]>; <[email protected]> Sent: Saturday, May 17, 2003 12:53 AM Subject: Re: Question about Polish input method > >>>>> "Ben" == Ben Wing <[email protected]> writes: > > Ben> you really need to ask martin about this. he claims to have done something to > Ben> make this work correctly but i don't know what's missing. > > IIRC: > I think the thing that's missing is that events like [aogonek] are > supposed to be bound to self-insert-command. This is supposed to > happen without user intervention, and was reported to work correctly > by Hrvoje for Croatian in 21.4 sometime. Polish should be in Latin2, > like Croatian, so should work similarly. Someone will have to do some > hacking to find out what's going wrong. > > (Dead keys, on the other hand, have never been supported by this mechanism.) > > Martin > > Ben> ----- Original Message ----- > Ben> From: "Stephen J. Turnbull" <[email protected]> > Ben> To: "Jakub Nadolny" <[email protected]> > Ben> Cc: <[email protected]> > Ben> Sent: Thursday, May 15, 2003 6:32 AM > Ben> Subject: Re: Question about Polish input method > > > >> >>>>> "Jakub" == Jakub Nadolny <[email protected]> writes: > >> > Jakub> when I try to have some Polish diactrical characters, such > Jakub> as -Bą, ę, ć etc. I press right alt + letter (e.g. alt + a to-A > Jakub> have -Bą) and there is a message "aogonek not-A > Jakub> defined". Similar message for other letters: > >> > >> I don't really understand the low-level keyboard code; there is > >> support for recognizing these keysyms, but they're not used for input > >> by default. Seems crazy. If you execute the expression below, you > >> should be able to use Alt + letter to enter Polish characters. This > >> assumes that you are using a Mule build; if not, you'll get a bunch of > >> errors for `make-char'. In the no-Mule case, probably (1) using > >> iso8859-2 fonts and (2) executing > >> > >> (defun make-char (charset o1 o2) > >> (when o2 > >> (error 'invalid-argument "No multibyte characters in 8-bit Emacs!" o2)) > >> (if (not o1) > >> (error 'invalid-argument "Must specify a code point!") > >> (int-to-char o1))) > >> > >> before reexecuting the expression. > >> > >> If it works, please let us know. If you get any warnings about > >> redefinitions, I'd also like to know. Thanks! > >> > >> If you get Polish characters, but the correspondence to keystrokes > >> doesn't make sense, don't hesitate to let us know. > >> > Jakub> So it looks like there is no input method for Polish > Jakub> language? Can you help me? > >> > >> Besides the direct input method above, you could use the leim package > >> (M-x list-packages, update the index, get and install leim), which > >> provides a number of input methods including latin-2-prefix and > >> latin-2-postfix. > >> > >> (mapcar > >> (lambda (pair) > >> (let ((keysym (car pair)) (code (cdr pair))) > >> (when (lookup-key global-map (vector keysym)) > >> (warn (format > >> "Overriding existing keymapping for %s to self-insert-command" > >> keysym))) > >> (define-key global-map (vector keysym) #'self-insert-command) > >> (when (get 'EuroSign 'ascii-character) > >> (warn (format > >> "Overriding existing definition of %s to #x%02x" > >> keysym code))) > >> (put keysym 'ascii-character (make-char 'latin-iso8859-2 code)))) > >> '((Aogonek . #xa1) > >> (breve . #xa2) > >> (Lstroke . #xa3) > >> (Lcaron . #xa5) > >> (Sacute . #xa6) > >> (Scaron . #xa9) > >> (Scedilla . #xaa) > >> (Tcaron . #xab) > >> (Zacute . #xac) > >> (Zcaron . #xae) > >> (Zabovedot . #xaf) > >> (aogonek . #xb1) > >> (ogonek . #xb2) > >> (lstroke . #xb3) > >> (lcaron . #xb5) > >> (sacute . #xb6) > >> (caron . #xb7) > >> (scaron . #xb9) > >> (scedilla . #xba) > >> (tcaron . #xbb) > >> (zacute . #xbc) > >> (doubleacute . #xbd) > >> (zcaron . #xbe) > >> (zabovedot . #xbf) > >> (Racute . #xc0) > >> (Abreve . #xc3) > >> (Lacute . #xc5) > >> (Cacute . #xc6) > >> (Ccaron . #xc8) > >> (Eogonek . #xca) > >> (Ecaron . #xcc) > >> (Dcaron . #xcf) > >> (Dstroke . #xd0) > >> (Nacute . #xd1) > >> (Ncaron . #xd2) > >> (Odoubleacute . #xd5) > >> (Rcaron . #xd8) > >> (Uring . #xd9) > >> (Udoubleacute . #xdb) > >> (Tcedilla . #xde) > >> (racute . #xe0) > >> (abreve . #xe3) > >> (lacute . #xe5) > >> (cacute . #xe6) > >> (ccaron . #xe8) > >> (eogonek . #xea) > >> (ecaron . #xec) > >> (dcaron . #xef) > >> (dstroke . #xf0) > >> (nacute . #xf1) > >> (ncaron . #xf2) > >> (odoubleacute . #xf5) > >> (udoubleacute . #xfb) > >> (rcaron . #xf8) > >> (uring . #xf9) > >> (tcedilla . #xfe) > >> (abovedot . #xff))) > >> > >> > >> -- > >> Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp > >> University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN > >> Ask not how you can "do" free software business; > >> ask what your business can "do for" free software. > >> > >