Closed Bug 208721 Opened 22 years ago Closed 22 years ago

Can't type Unicode Keysyms when compiled with Gtk2

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zwnj, Assigned: blizzard)

References

Details

(Keywords: fixed1.4.2, Whiteboard: fixed 1.5b)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030530 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030530 I can't type Persian letters in any types of text field (address bar, html text input and text area, etc) in Mozilla 1.4b and Mozilla 1.4 (RPMs from RedHat RawHide) on RedHat 9. Letters: PEH (067E), TCHEH (0686), JEH (0698), KEHEH (06A9), GAF (06AF), FARSI YEH (06CC) But Arabic letters [some other characters in Arabic table] works fine. Reproducible: Always Steps to Reproduce:
I'm using build 2003060503 on Mac OS X 10.2.6, with Unicode Hex Input : PEH (067E) : پ TCHEH (0686) : چ JEH (0698) : ژ KEHEH (06A9) : ک GAF (06AF) : گ FARSI YEH (06CC) : ی I don't speak any Persian, but I can see 6 different characters here in the inputbox. I can also slect them in the Unicode Character palette, in the arabic block.
Oh well, they didn't arrive in Bugzilla correctly : PEH (067E) became پ for instance.
Attached file test
Correction, they arrived correctly (1662 is 067E hexadecimal), but Mozilla didn't shown them on bugzilla pages. It works in this attachment (I'm using the universal detector).
As you can see, I said there is a problem with TYPING PERISAN LETTERS, and not showing them. And also the problem is in Linux version, and there is no problem with windows. (and probably Mac OS X). I (just) think it's a mistake of Mozilla with GTK+ integration.
This looks like bug 188538, where this was fixed for Arabic, but maybe it doesn't work for Persian (although they should come from the same block). Can you try the workaround in bug 188538 comment 8 ?
I have tested locale LANG=fa_IR.UTF-8, but i couldn't input those 6 letters yet. As RedHat's default character encoding is UTF-8 in varsion 8+, so it couldn't be any problem of these. As I know, X server sends correct character codes to apps (tested in gnu, gnome and kde utlis). But mozilla have incorrect behavier. This bug differs to what you said, because it is only for Persian letters, and this isn't cause of wrong encoding.
I can confirm this. I can reproduce it on Red Hat Linux 9 after installing the Rawhide RPM for Mozilla available from <http://rawhide.redhat.com/pub/redhat/linux/rawhide/i386/RedHat/RPMS/>. The problems seems to be with the special Unicode X11 Keysyms, in the 0x100ABCD format. These Keysyms don't pass whatever input method the Rawhide's Mozilla build is using (GTK+?). The problem is not Persian-specific. The XFree86 keyboard layouts for all the following languages contain Unicode Keysyms: Armenian (all letters), Arabic (digits in the "digits" alternative keyboard), Azerbaijani (Azeri-specific latin letters), all Indic layouts, Lao, Burmese, ... The problem does not exist in Mozilla 1.2.1 that is shipped with Red Hat 9, and one can easily enter these characters.
Severity: normal → major
Status: UNCONFIRMED → NEW
Component: BiDi Hebrew & Arabic → Internationalization
Ever confirmed: true
Summary: Can't type Persian letters [NOT Arabic] → Can't type Unicode Keysyms in Linux
This seems to be Rawhide/GTK+ related only, as I can't reproduce it with normal builds. Changing component to 'GFX: GTK', CC-ing blizzard. Making myself the QA contact. Exact steps to reproduce: 1. On Red Hat 9, download and install Rawhide RPMs of mozilla. 2. On a command prompt, type: setxkbmap us+ir -option "grp:shift_toggle,grp_led:scroll" 3. Launch Mozilla, focus its address bar. 4. Press the both shifts together. (This should switch the layout to the Iranian one.) 5. Press "m". It doesn't produce anything on the screen, while it should produce an Arabic Peh. (Alternatively, press "f". It produces an Arabic Beh.)
Component: Internationalization → GFX: Gtk
QA Contact: zach → roozbeh
Blocks: gtk2
The same bug exists in the version of Mozilla distributed with Ximian Desktop 2. Version info: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030530
blizzard, any hint to where in the code to look for the bug? This is rather critical for us (Persian writers, bla bla) and we want to fix this as soon as possible.
A patch to fix the bug. Would someone please test it?
blizzard, may I get a review and/or super-review? I guess it's too trivial. I simply copied the fix from 'widget/src/gtk/nsGtkEventHandler.cpp'.
Assignee: mkaply → blizzard
QA Contact: roozbeh → ian
Summary: Can't type Unicode Keysyms in Linux → Can't type Unicode Keysyms when compiled with Gtk2
I have tested tonight's nightly build with Behdad's patch on RedHat 9 (full updated) with gtk2-2.2.1-4 and it worked fine. This is an example of 6 persian-only characters with compiled Mozilla: "گچ پژ یک".
Comment on attachment 129659 [details] [diff] [review] Patch to fix the bug r+sr=blizzard
Attachment #129659 - Flags: superreview+
Attachment #129659 - Flags: review+
Attachment #129659 - Flags: approval1.5b?
Attachment #129659 - Flags: approval1.4.x?
Comment on attachment 129659 [details] [diff] [review] Patch to fix the bug a=chofmann for 1.5b
Attachment #129659 - Flags: approval1.5b? → approval1.5b+
Checked into the trunk for 1.5b.
Whiteboard: fixed 1.5b
Comment on attachment 129659 [details] [diff] [review] Patch to fix the bug This is not going to make 1.4.1. Please re-request aproval after 1.4.1 ships if you'd like to get this in for 1.4.2.
Attachment #129659 - Flags: approval1.4.x? → approval1.4.x-
Would someone please approve the patch for 1.4.2?
Comment on attachment 129659 [details] [diff] [review] Patch to fix the bug a=blizzard on behalf of drivers for 1.4.2
Attachment #129659 - Flags: approval1.4.2+
fixed on 1.4 branch hmmm... is fixed1.4 a correct keyword to use? Checking in nsGtkKeyUtils.cpp; /cvsroot/mozilla/widget/src/gtk2/nsGtkKeyUtils.cpp,v <-- nsGtkKeyUtils.cpp new revision: 1.4.20.1; previous revision: 1.4 done
Keywords: fixed1.4
Shouldn't this bug be set to RESOLVED-FIXED now?
Yeah, it's been checked in everywhere that matters now.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: