* Cedilla input in UTF-8 locale with dead keys. [not found] ` <1192198027.4579.11.camel@hamlet.sagui> @ 2007-10-15 12:09 ` Kenichi Handa 2007-10-15 12:37 ` Andreas Schwab 2007-10-15 13:13 ` Jan Djärv 0 siblings, 2 replies; 12+ messages in thread From: Kenichi Handa @ 2007-10-15 12:09 UTC (permalink / raw) To: emacs-devel; +Cc: gustavo [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=ISO-2022-JP-2, Size: 1603 bytes --] Attached is a report about the inconsistency of dead key handling on Emacs with the other applications. I confirmed the reported behaviour with the trunk code by starting the X session in pt_BR.UTF-8 locale. Typing "RightAlt-' c" inserts ^[$(D+.^[(B (c-cedilla) in gnome-terminal, but it inserts ^[$(D++^[(B (c-acute) in Emacs. But, it seems that inserting c-cedilla is the behaviour only with GNOME/GTK applications (and OpenOffice, Mozilla). For instance, xev reports "RightAlt-' c" as c-acute, any KDE applications (e.g. kedit) insert c-acute. Gustavo, could you also try them? I'm not sure what we should do. Emacs is not a GTK application even if it is configured with --with-gtk. But, from the user point of view, I think it is better that it insert c-cedilla as well as the other GNOME applications. But, as I'm not that familiar with GTK programming, I don't know how to do that. --- Kenichi Handa handa@m17n.org ------- Start of forwarded message ------- From: Gustavo Maciel Dias Vieira <gustavo@sagui.org> To: bug-gnu-emacs@gnu.org MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Date: Wed, 3 Oct 2007 14:00:55 -0300 (BRT) Subject: Cedilla input in UTF-8 locale with dead keys. If you use the combination of Emacs 22, a US keyboard and dead keys in a UTF-8 locale, the combination of '+c will give you ^[$(D++^[(B (accented-c) instead of ^[$(D+.^[(B (cedilla). Granted, not everyone will want a cedilla, but some people will do. Brazilians for example. GTK2 had the same issue some time ago and they created an input method called "cedilla" that is activated based on locale. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 12:09 ` Cedilla input in UTF-8 locale with dead keys Kenichi Handa @ 2007-10-15 12:37 ` Andreas Schwab 2007-10-15 13:13 ` Kenichi Handa 2007-10-15 13:13 ` Jan Djärv 1 sibling, 1 reply; 12+ messages in thread From: Andreas Schwab @ 2007-10-15 12:37 UTC (permalink / raw) To: Kenichi Handa; +Cc: gustavo, emacs-devel Kenichi Handa <handa@m17n.org> writes: > Attached is a report about the inconsistency of dead key > handling on Emacs with the other applications. I confirmed > the reported behaviour with the trunk code by starting the X > session in pt_BR.UTF-8 locale. Typing "RightAlt-' c" > inserts ç (c-cedilla) in gnome-terminal, but it inserts ć > (c-acute) in Emacs. Which keysym is on RightAlt-'? Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 12:37 ` Andreas Schwab @ 2007-10-15 13:13 ` Kenichi Handa 2007-10-15 13:42 ` Andreas Schwab 0 siblings, 1 reply; 12+ messages in thread From: Kenichi Handa @ 2007-10-15 13:13 UTC (permalink / raw) To: Andreas Schwab; +Cc: gustavo, emacs-devel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=ISO-2022-JP-2, Size: 599 bytes --] In article <jemyukr1tv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > Kenichi Handa <handa@m17n.org> writes: > > Attached is a report about the inconsistency of dead key > > handling on Emacs with the other applications. I confirmed > > the reported behaviour with the trunk code by starting the X > > session in pt_BR.UTF-8 locale. Typing "RightAlt-' c" > > inserts ^[$(D+.^[(B (c-cedilla) in gnome-terminal, but it inserts ^[$(D++^[(B > > (c-acute) in Emacs. > Which keysym is on RightAlt-'? 0x1000107; i.e. U+0107 LATIN SMALL LETTER C WITH ACUTE --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 13:13 ` Kenichi Handa @ 2007-10-15 13:42 ` Andreas Schwab 2007-10-16 5:12 ` Kenichi Handa 0 siblings, 1 reply; 12+ messages in thread From: Andreas Schwab @ 2007-10-15 13:42 UTC (permalink / raw) To: Kenichi Handa; +Cc: gustavo, emacs-devel Kenichi Handa <handa@m17n.org> writes: > In article <jemyukr1tv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > >> Kenichi Handa <handa@m17n.org> writes: >> > Attached is a report about the inconsistency of dead key >> > handling on Emacs with the other applications. I confirmed >> > the reported behaviour with the trunk code by starting the X >> > session in pt_BR.UTF-8 locale. Typing "RightAlt-' c" >> > inserts ç (c-cedilla) in gnome-terminal, but it inserts ć >> > (c-acute) in Emacs. > >> Which keysym is on RightAlt-'? > > 0x1000107; i.e. U+0107 LATIN SMALL LETTER C WITH ACUTE Where does the c key come into play then? Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 13:42 ` Andreas Schwab @ 2007-10-16 5:12 ` Kenichi Handa 2007-10-16 8:35 ` Andreas Schwab 0 siblings, 1 reply; 12+ messages in thread From: Kenichi Handa @ 2007-10-16 5:12 UTC (permalink / raw) To: Andreas Schwab; +Cc: gustavo, emacs-devel In article <jeir58qytk.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > Kenichi Handa <handa@m17n.org> writes: > > In article <jemyukr1tv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > > >>> Kenichi Handa <handa@m17n.org> writes: >>> > Attached is a report about the inconsistency of dead key >>> > handling on Emacs with the other applications. I confirmed >>> > the reported behaviour with the trunk code by starting the X >>> > session in pt_BR.UTF-8 locale. Typing "RightAlt-' c" >>> > inserts ç (c-cedilla) in gnome-terminal, but it inserts ć >>> > (c-acute) in Emacs. > > >>> Which keysym is on RightAlt-'? > > > > 0x1000107; i.e. U+0107 LATIN SMALL LETTER C WITH ACUTE > Where does the c key come into play then? Oops, my fault. The above keysym is returned by typing "RightAlt-' c". With just "RightAlt-'", xev reports these keysyms (the first one by RightAlt, the second by ': KeyPress event, serial 29, synthetic NO, window 0x3200001, root 0x4d, subw 0x3200002, time 2805295975, (32,34), root:(1428,80), state 0x0, keycode 113 (keysym 0xff20, Multi_key), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: True KeyPress event, serial 29, synthetic NO, window 0x3200001, root 0x4d, subw 0x3200002, time 2805299769, (32,34), root:(1428,80), state 0x80, keycode 48 (keysym 0x27, apostrophe), same_screen YES, XLookupString gives 1 bytes: (27) "'" XmbLookupString gives 1 bytes: (27) "'" XFilterEvent returns: True Please note that XFilterEvent is True in both cases. Thus some input method has filtered them. --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-16 5:12 ` Kenichi Handa @ 2007-10-16 8:35 ` Andreas Schwab 2007-10-16 13:21 ` Stefan Monnier 0 siblings, 1 reply; 12+ messages in thread From: Andreas Schwab @ 2007-10-16 8:35 UTC (permalink / raw) To: Kenichi Handa; +Cc: gustavo, emacs-devel Kenichi Handa <handa@m17n.org> writes: > Oops, my fault. The above keysym is returned by typing > "RightAlt-' c". With just "RightAlt-'", xev reports these > keysyms (the first one by RightAlt, the second by ': Since RightAlt is not a modifier you need to type it separately. If you write RightAlt-' it looks like RightAlt modifies the ' key, and I was assuming that produces <dead_acute>. > KeyPress event, serial 29, synthetic NO, window 0x3200001, > root 0x4d, subw 0x3200002, time 2805295975, (32,34), root:(1428,80), > state 0x0, keycode 113 (keysym 0xff20, Multi_key), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: True > > KeyPress event, serial 29, synthetic NO, window 0x3200001, > root 0x4d, subw 0x3200002, time 2805299769, (32,34), root:(1428,80), > state 0x80, keycode 48 (keysym 0x27, apostrophe), same_screen YES, > XLookupString gives 1 bytes: (27) "'" > XmbLookupString gives 1 bytes: (27) "'" > XFilterEvent returns: True That explains it. pt_BR.UTF-8/Compose says that <Multi_key> <acute> <C> produces "Ć" (unlike <dead_acute> <C>, which is supposed to produce "Ç"). Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-16 8:35 ` Andreas Schwab @ 2007-10-16 13:21 ` Stefan Monnier 0 siblings, 0 replies; 12+ messages in thread From: Stefan Monnier @ 2007-10-16 13:21 UTC (permalink / raw) To: Andreas Schwab; +Cc: gustavo, emacs-devel, Kenichi Handa >> Oops, my fault. The above keysym is returned by typing >> "RightAlt-' c". With just "RightAlt-'", xev reports these >> keysyms (the first one by RightAlt, the second by ': > Since RightAlt is not a modifier you need to type it separately. If you > write RightAlt-' it looks like RightAlt modifies the ' key, and I was > assuming that produces <dead_acute>. Actually, I believe as long as you press RightAlt before pressing ' it'll work, even if you don't release RightAlt before pressing '. So even though it's not a modifier, you can almost use it like one. Stefan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 12:09 ` Cedilla input in UTF-8 locale with dead keys Kenichi Handa 2007-10-15 12:37 ` Andreas Schwab @ 2007-10-15 13:13 ` Jan Djärv 2007-10-15 14:02 ` Andreas Schwab 2007-10-15 14:05 ` Stefan Monnier 1 sibling, 2 replies; 12+ messages in thread From: Jan Djärv @ 2007-10-15 13:13 UTC (permalink / raw) To: Kenichi Handa; +Cc: gustavo, emacs-devel FWIW, Gtk+ has a special handling of this. Gtk+ also processes all compose itself, rather than using X. See Gtk+ sources, modules/input/imcedilla.c: /* The difference between this and the default input method is the handling * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. * For languages that use CCedilla and not acute, this is the preferred mapping, * and is particularly important for pt_BR, where the us-intl keyboard is * used extensively. */ Since Emacs does not use Gtk+ for character input, we don't get that mapping. Jan D. Kenichi Handa skrev: > Attached is a report about the inconsistency of dead key > handling on Emacs with the other applications. I confirmed > the reported behaviour with the trunk code by starting the X > session in pt_BR.UTF-8 locale. Typing "RightAlt-' c" > inserts ç (c-cedilla) in gnome-terminal, but it inserts ć > (c-acute) in Emacs. > > But, it seems that inserting c-cedilla is the behaviour only > with GNOME/GTK applications (and OpenOffice, Mozilla). For > instance, xev reports "RightAlt-' c" as c-acute, any KDE > applications (e.g. kedit) insert c-acute. Gustavo, could > you also try them? > > I'm not sure what we should do. Emacs is not a GTK > application even if it is configured with --with-gtk. But, > from the user point of view, I think it is better that it > insert c-cedilla as well as the other GNOME applications. > > But, as I'm not that familiar with GTK programming, I don't > know how to do that. > > --- > Kenichi Handa > handa@m17n.org > > ------- Start of forwarded message ------- > From: Gustavo Maciel Dias Vieira <gustavo@sagui.org> > To: bug-gnu-emacs@gnu.org > MIME-version: 1.0 > Content-type: text/plain; charset=utf-8 > Date: Wed, 3 Oct 2007 14:00:55 -0300 (BRT) > Subject: Cedilla input in UTF-8 locale with dead keys. > > > If you use the combination of Emacs 22, a US keyboard and dead > keys in a UTF-8 locale, the combination of '+c will give you > ć (accented-c) instead of ç (cedilla). Granted, not everyone will want > a cedilla, but some people will do. Brazilians for example. GTK2 had > the same issue some time ago and they created an input method called > "cedilla" that is activated based on locale. > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 13:13 ` Jan Djärv @ 2007-10-15 14:02 ` Andreas Schwab 2007-10-16 7:16 ` Jan Djärv 2007-10-15 14:05 ` Stefan Monnier 1 sibling, 1 reply; 12+ messages in thread From: Andreas Schwab @ 2007-10-15 14:02 UTC (permalink / raw) To: Jan Djärv; +Cc: gustavo, emacs-devel, Kenichi Handa Jan Djärv <jan.h.d@swipnet.se> writes: > FWIW, Gtk+ has a special handling of this. Gtk+ also processes all > compose itself, rather than using X. See Gtk+ sources, > modules/input/imcedilla.c: > > /* The difference between this and the default input method is the handling > * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. > * For languages that use CCedilla and not acute, this is the preferred mapping, > * and is particularly important for pt_BR, where the us-intl keyboard is > * used extensively. > */ > > Since Emacs does not use Gtk+ for character input, we don't get that mapping. According to /usr/share/X11/locale/pt_BR.UTF-8/Compose, <dead_acute> <C> produces "Ç", not "Ć". Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 14:02 ` Andreas Schwab @ 2007-10-16 7:16 ` Jan Djärv 0 siblings, 0 replies; 12+ messages in thread From: Jan Djärv @ 2007-10-16 7:16 UTC (permalink / raw) To: Andreas Schwab; +Cc: gustavo, Kenichi Handa, emacs-devel Andreas Schwab skrev: > Jan Djärv <jan.h.d@swipnet.se> writes: > >> FWIW, Gtk+ has a special handling of this. Gtk+ also processes all >> compose itself, rather than using X. See Gtk+ sources, >> modules/input/imcedilla.c: >> >> /* The difference between this and the default input method is the handling >> * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. >> * For languages that use CCedilla and not acute, this is the preferred mapping, >> * and is particularly important for pt_BR, where the us-intl keyboard is >> * used extensively. >> */ >> >> Since Emacs does not use Gtk+ for character input, we don't get that mapping. > > According to /usr/share/X11/locale/pt_BR.UTF-8/Compose, <dead_acute> <C> > produces "Ç", not "Ć". > I can see that this file gets read by for example xterm, but it doesn't seem to have any effect. Strange. Jan D. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 13:13 ` Jan Djärv 2007-10-15 14:02 ` Andreas Schwab @ 2007-10-15 14:05 ` Stefan Monnier 2007-10-16 2:04 ` Kenichi Handa 1 sibling, 1 reply; 12+ messages in thread From: Stefan Monnier @ 2007-10-15 14:05 UTC (permalink / raw) To: Jan Djärv; +Cc: gustavo, emacs-devel, Kenichi Handa > FWIW, Gtk+ has a special handling of this. Gtk+ also processes all compose > itself, rather than using X. See Gtk+ sources, modules/input/imcedilla.c: > /* The difference between this and the default input method is the handling > * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. > * For languages that use CCedilla and not acute, this is the preferred mapping, > * and is particularly important for pt_BR, where the us-intl keyboard is > * used extensively. > */ > Since Emacs does not use Gtk+ for character input, we don't get that mapping. Looks like brain-damage on the part of the Gtk guys: if there's a problem in this area, it should be fixed in Xlib, not in Gtk. I'd rather follow the standard X behavior (and maybe lobby for its change), than use some ad-hoc workaround. Stefan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cedilla input in UTF-8 locale with dead keys. 2007-10-15 14:05 ` Stefan Monnier @ 2007-10-16 2:04 ` Kenichi Handa 0 siblings, 0 replies; 12+ messages in thread From: Kenichi Handa @ 2007-10-16 2:04 UTC (permalink / raw) To: Stefan Monnier; +Cc: gustavo, jan.h.d, emacs-devel In article <jwv1wbwfpaa.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca> writes: > > FWIW, Gtk+ has a special handling of this. Gtk+ also processes all compose > > itself, rather than using X. See Gtk+ sources, modules/input/imcedilla.c: > > /* The difference between this and the default input method is the handling > > * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. > > * For languages that use CCedilla and not acute, this is the preferred mapping, > > * and is particularly important for pt_BR, where the us-intl keyboard is > > * used extensively. > > */ Ah! It is done by Gtk's input method. > > Since Emacs does not use Gtk+ for character input, we don't get that mapping. I see. > Looks like brain-damage on the part of the Gtk guys: if there's a problem in > this area, it should be fixed in Xlib, not in Gtk. > I'd rather follow the standard X behavior (and maybe lobby for its change), > than use some ad-hoc workaround. I fully agree. By the way, I found that c-cedilla can be input by typing "RightAlt-, c" with all applications (including Emacs) in pt_BR.UTF-8 locale. --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-10-16 13:21 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1IdUUG-0002a3-UI@fencepost.gnu.org> [not found] ` <E1IgJNl-000664-EJ@etlken.m17n.org> [not found] ` <1192198027.4579.11.camel@hamlet.sagui> 2007-10-15 12:09 ` Cedilla input in UTF-8 locale with dead keys Kenichi Handa 2007-10-15 12:37 ` Andreas Schwab 2007-10-15 13:13 ` Kenichi Handa 2007-10-15 13:42 ` Andreas Schwab 2007-10-16 5:12 ` Kenichi Handa 2007-10-16 8:35 ` Andreas Schwab 2007-10-16 13:21 ` Stefan Monnier 2007-10-15 13:13 ` Jan Djärv 2007-10-15 14:02 ` Andreas Schwab 2007-10-16 7:16 ` Jan Djärv 2007-10-15 14:05 ` Stefan Monnier 2007-10-16 2:04 ` Kenichi Handa
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).