Closed Bug 188538 Opened 22 years ago Closed 22 years ago

can't write arabic in web text box or email

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.4alpha

People

(Reporter: jarbouym, Assigned: smontagu)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

I can't arabic in a web text box, i.e, when I want to search for arabic site
using google search engine, I can't enter arabic keywords in the google text
box. The same also happen when I want to send arabic email, I can't enter arabic
text nither in the subject nor in the body.

Reproducible: Always

Steps to Reproduce:
1.go www.google.com
2.change keyboard map to [ar]
3.write text in search box 

Actual Results:  
- can't accept keyboard input
- or, if I copy/paste from editor, it shows question marks

Expected Results:  
allow input from arabic keyboard map.

a lot of effort regarding arabic support in mozilla especially the arabic/bidi
support which I can say THANK YOU. and we look forward to solve this problem.
->Bidi, cc:smontagu
Assignee: font → mkaply
Component: Layout: Fonts and Text → BiDi Hebrew & Arabic
QA Contact: ian → zach
This works for me (in RedHat 8) only if I set LC_ALL=en_US.UTF-8, but Hebrew and
Russian input work correctly even if I don't do that. I am investigating further.
Attached patch PatchSplinter Review
This patch corrects the bug for me, but since change history shows that this is
a tricky area, careful regression testing will be needed.
Some background:

When using Arabic keymap, aGEK->keyval in InitKeyPressEvent() at
http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsGtkEventHandler.cpp#411
contains values like 0x10000634. When using Hebrew keymap, it contains values
like 0xcf9, i.e. GDK_hebrew_shin as defined in gdkkeysyms.h.

Comparing the mapping files in /usr/lib/X11/xkb/symbols/ar and
/usr/lib/X11/xkb/symbols/il, I see the same distinction.

keysym2ucs at
http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/keysym2ucs.c#859
converts these "directly encoded 24-bit UCS characters" without worries.

cc-ing some folks who may be able to help with this.
I faced this probelm before.. It turned out that I must use a UTF-8 locale .. I used to use 
ar_JO now I use en_US.UTF-8 .. and ar_JO.UTF-8 works as well 
 
Try using ANY UTF-8 locale and I guess input will work .. 
I use weekly updated version from CVS of mozilla and input is working fine 
Status: UNCONFIRMED → NEW
Ever confirmed: true
Dear Isam
Please, can you show me in steps how to be able to write arabic text in mozilla
using UTF-8 encoding.

Kind Regards
-Yaser
OK.. Yaser.. from the command prompt execute:  
# locale 
and see if you are using a locale that end with UTF-8 .. if not write the following command 
(bash): 
# export LANG=en_US.UTF-8 
and now run mozilla from command prompt and see for your self..  
Yes, It works Now
Thank you Isam, and appreciate your patiance.
Thanks to all contributors.

-Yaser
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
it is strange and rather unacceptable behavior that Arabic input work on en_US.UTF-8 and 
do not work at ar_SA or ar_JO . why UTF-8 locale is a must? displaying Arabic with any 
locale works fine, and Arabic keyboard work on all KDE and GNOME applications (accept 
OpenOffice 643c that requiers a UTF-8 locale as well) without the need of a UTF-8 locale. 
Reopening. Setting a UTF-8 locale is a workaround, not a fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Taking bug.
Assignee: mkaply → smontagu
Status: REOPENED → NEW
Target Milestone: --- → mozilla1.4alpha
Comment on attachment 111256 [details] [diff] [review]
Patch

r=jag (or sr= if you prefer)
Attachment #111256 - Flags: review+
smontagu: I kinda doubt this patch will regress anything, but make sure these
three bugs are still fixed with your patch, and just try out common stuff
(cut/copy/paste, typing, alt+f to open file menu):

bug 53667 - alt + left/right doesn't navigate back/forward
bug 55792 - ctrl + left/right not skipping words
bug 54694 - ctrl + left segfaults
Attachment #111256 - Flags: superreview?(blizzard)
Comment on attachment 111256 [details] [diff] [review]
Patch

sr=blizzard
Attachment #111256 - Flags: superreview?(blizzard) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: