Bug 70995

Summary: Can't enter " easily with us_intl keyboard
Product: [Retired] Red Hat Public Beta Reporter: Alexandre Oliva <aoliva>
Component: gtk2Assignee: Owen Taylor <otaylor>
Status: CLOSED RAWHIDE QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: limboCC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-08-14 03:17:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 71014    
Bug Blocks: 67218    
Attachments:
Description Flags
Patch for gtk+ to fix dead key sequences.
none
Patch as applied none

Description Alexandre Oliva 2002-08-07 17:34:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020724

Description of problem:
Some applications seem to display the diaeresis character as the double quote,
but gnome-terminal and other gnome applications get them different, which makes
it awkward to enter shell code containing double quotes, because there's no easy
key sequence to type it in.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.setxkbmap us_intl
2.start say GNU emacs or xterm
3.type double-quote space, double-quote twice, then Right-Alt Shift double-quote
4.start gnome-terminal, gnome-text-editor, and many other gnome applications
5.type double-quote twice, then double-quote space, then Right-Alt Shift
double-quote

Actual Results:  For 3, you get diaeresis, quotedbl, quotedbl (even though
diaeresis doesn't display as such on GNU Emacs; that's a separate bug already)
For 5, you get diaeresis, diaeresis, quotedbl.

Expected Results:  I expected to get 3's results on 5 too, as defined in XFree86
UTF8 Compose rules.

Additional info:

All of these commands are run with LANG=en_US.UTF8.

Comment 1 Alexandre Oliva 2002-08-07 17:51:37 UTC
FWIW, konsole and other KDE applications I've tested exhibit the correct
behavior.  Also, contrary to my initial description of the problem, it's not
about displaying characters incorrectly, it's about getting the meaning of
keystrokes incorrectly.

Comment 2 Owen Taylor 2002-08-07 19:00:30 UTC
In en_US/.UTF-8Compose, I see:

<dead_diaeresis> <space> : "\"" quotedbl
<dead_diaeresis> <dead_diaeresis>  : "(" diaeresis

Which looks backwards from what you have above for the xterm/emacs
case...

The GTK+ universal compose table got these mappings from the iso-8859-1
Compose sequences ... so it does the same thing as the keys would
have done in previous releases. The Xlib en_US.UTF-8 table disagrees
with the iso-8859-1 table.

BTW - You can make GTK+ use the Xlib compose tables if you set
GTK_IM_MODULE=xim (gnome-terminal doesn't currently offer a 
way to select that interactively, most apps have a right click
menu.)


Comment 3 Alexandre Oliva 2002-08-07 19:14:38 UTC
Oops.  Sorry.  Steps to Reproduce.3 should have read like 5.
The iso-8859-1 compose tables were wrong (IMO) in earlier releases, an opinion
shared by a number of other users of international keyboards I know.  I still
haven't checked whether they've been corrected, but a patch for XFree86 to fix
them was sent a while ago.

Comment 4 Alexandre Oliva 2002-08-07 20:31:33 UTC
FWIW, iso8859-15 had got the diaeresis compose rules right, but iso8859-1 still
had them wrong.  I've just submitted a patch for XFree86 (internal and upstream)
that fixes this and a few other oddities in the iso8859-1 compose tables.  Bug
71014.

Comment 5 Alexandre Oliva 2002-08-10 21:21:06 UTC
Where is it that the gtk2 encoding tables are stored in the gtk2 source tree?  I
can try to fix them myself, and some pointers would surely help me get to it :-)
 Thanks,

Comment 6 Owen Taylor 2002-08-12 15:50:29 UTC
 gtk+/gtk/gtkimcontextsimple.c

Ignore the comment about the Perl scripts ... if I have them
any more, I don't know where they are. (And there was quite
a bit of hand editing involved as well in getting to the
current form.)



Comment 7 Alexandre Oliva 2002-08-14 02:12:14 UTC
The following patch adjusts the behavior of quotedbl space and introduces
double-dead-accent sequences for the grave and circumflex accents, that would
formerly generate nothing.  It also rearranges the similar sequences for acute
accent and tilde, so that they're all in the beginning.  With these changes, the
behavior matches that of XFree86, at least as far as these sequences are concerned.

Comment 8 Alexandre Oliva 2002-08-14 02:13:41 UTC
Created attachment 70464 [details]
Patch for gtk+ to fix dead key sequences.

Comment 9 Alexandre Oliva 2002-08-14 02:26:37 UTC
I failed to mention I haven't tested this patch, cause I'm missing glib2-2.0.6
in my laptop.  I'll try it out tomorrow, and probably find out I shouldn't have
reordered the entries :-(

Comment 10 Owen Taylor 2002-08-14 03:17:42 UTC
Created attachment 70485 [details]
Patch as applied

Comment 11 Owen Taylor 2002-08-14 04:06:53 UTC
Tests out fine in 2.0.6-3