Closed Bug 128206 Opened 23 years ago Closed 23 years ago

the euro symbol input from Sun keyboard cannot be display correctly

Categories

(MailNews Core :: Internationalization, defect)

Sun
Solaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: yinbolian, Assigned: ftang)

References

Details

(Keywords: intl, Whiteboard: SunKey)

Attachments

(1 file, 1 obsolete file)

In MailNews, open compose to write a email, input euro symbol from Sun Keyboard ( AltGraph+e), a wrong symbol of "?" is displayed instead of "€". The same problem exists in Composer.
========Information for Reference: =========== Latin-1 code of euro: 164 (0xa4) Unicode of euro: 8364 (0x20ac) Press AltGraph+e to input euro from Sun Keyboard The Keycode mozilla get is 164, That is right for euro. I think there are two methods to fix it: 1. in widget/src/gtk/keysym2ucs.c : keysym2ucs function, map 164 to 0x20ac. It is reasonable, since mozilla change keyboard value to unicdoe here. 2. in intl/uconv/ucvlatin/8859-15.uf : map 0xa4 to 0xa4 instead of fffd. This can make mozilla find the euro glyph from 8859-1 charset. Frank, 8859-15.uf is generated by you from fromu? Does this file used only in converting Unicode ==> 8859-15, since there is a 88590-15.ut there. And do you think such change is needed? I think the first way is better.
reassing to ftang
Assignee: ducarroz → ftang
Status: UNCONFIRMED → NEW
Component: Composition → Internationalization
Ever confirmed: true
Keywords: intl
QA Contact: sheelar → ji
Bolian, do you see the same problem with HTML composer (Tasks | Composer)?
>========Information for Reference: =========== >Latin-1 code of euro: 164 (0xa4) >Unicode of euro: 8364 (0x20ac) > >Press AltGraph+e to input euro from Sun Keyboard why should AltGraph+ e generate Euro sign from sun keyboard? Is there any documentation said so? what is the following command tell you? xmodmap -pk | egrep "\(e\)" in my linux, it show me 26 0x0065 (e) 0x0045 (E) 0x00a4 (currency) which mean the AltGR+ e should generate currency sign instead of Euro sign. Does your Sun keyboard report you the same thing. If so, then it mean the xmodmap are generate XK_currency instead of XK_EuroSign when you press AltGr + e >The Keycode mozilla get is >164, That is right for euro. I think there are two methods to fix it: This is NOT right for euro. if you read /usr/X11R6/include/X11/keysymdef.h and search for XK_EuroSign you will find out it is #define XK_EuroSign 0x20ac in line 2011 in my 1.3 2000/08/18 version . Not sure about which version you got. This mean the keysym defined for Euro sign is 20ac, not 164. The problem is your xmodmap generate the wrong value for euro, you should generate 20ac instead of 164. check your xmodmap. in widget/src/gtk/keysym2ucs.c, we already map 20ac to 20ac 845 { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ >1. in widget/src/gtk/keysym2ucs.c : keysym2ucs function, map 164 to 0x20ac. It >is reasonable, since mozilla change keyboard value to unicdoe here. This is WRONG. In /usr/X11R6/include/X11/keysymdef.h it #define XK_currency 0x0a4 therefore, if you do that, you will break XK_currency which you should NOT. >2. in intl/uconv/ucvlatin/8859-15.uf : map 0xa4 to 0xa4 instead of fffd. This >can make mozilla find the euro glyph from 8859-1 charset. This is WRONG too. 8859-15.uf map unicode value to ISO-8859-15. However, ISO-8859-15 do not encode U+00A4 . >Frank, 8859-15.uf is generated by you from fromu? Does this file used only in >converting Unicode ==> 8859-15, since there is a 88590-15.ut there. And do you > think such change is needed? The real problem is your xmodmap is setting wrong. for example, if you have one file tt keycode 26 = e EuroSign and another file tt1 keycode 26 = e and if you do xmodmap tt1 and then type shift + e then you can type euro into mozilla to change it back xmodmap tt and now shift + e generate E instead of euro sign your proposal are off track. please study the keysym section in X11 programming first thanks. katakai- can you check the xmodmap sun ship with. What is sun's story about euro sign in solaris for xmodmap ? I think this a solaris bug, not a mozilla bug.
Status: NEW → ASSIGNED
>In MailNews, open compose to write a email, input euro symbol from Sun Keyboard >( AltGraph+e), a wrong symbol of "?" is displayed instead of "€". does it display as a question mark ? currency symbol looks like the 00a4 position in http://charts.unicode.org/Web/U0080.html
> why should AltGraph+ e generate Euro sign from sun keyboard? Is there any > documentation said so? what is the following command tell you? http://www.sun.com/software/white-papers/wp-eurocurrency/ This is an white-paper about "Euro Currency Support in the Solaris" Below is related to the input of Euro in it: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2.3.1 Keyboard Support In April 1998, the European Commission (EC) issued recommendations on the placement of the euro currency symbol on computer keyboards. The EC recommendation refers to the three main functional levels in keyboard standards: * Level 1: Press the "M" key to produce "m" * Level 2: Press SHIFT and "m" to produce "M" * Level 3: Press the AltGraph key and "A" on a UK keyboard to produce "à" The EC proposed both a short-term and long-term solution. The short-term proposal is to place the euro currency symbol on the "E" key at level 3. This means that the euro may be generated by pressing two keys: AltGraph and "E". The EC also recommends that the symbol be engraved on the keytop, which is common practice for many level 3 characters on European keyboards, such as German. Sun Keyboard Strategy Sun has adopted the short-term proposal for placement of the euro currency symbol on keyboards, meaning the euro will be placed at level 3 and can be generated by pressing AltGraph+e. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > xmodmap -pk | egrep "\(e\)" The output of this in my solaris is: 15 0x0065 (e) 0x0045 (E) 0x00a4 (currency) If you press AltGraph+e ( within a euro enabled locale, such as fi.ISO8859-15 "Finland", de_DE.ISO8859-15 "Germany") in the dtterm, the € will appear. It is the current input method of euro sign in Solaris. I think Mozilla should also support it. You can not expect the keysym value to be 0x20ac now, or the dtterm will have no way to get euro input from keyborad.
>You can not expect the keysym value to be 0x20ac now, why not? it is defined in the /usr/X11R6/include/X11/keysymdef.h include file, right ? IS dtterm X11R6 complient? >or the dtterm will have no way to get euro input from keyborad. Why don't you fix dtterm? Are you sure dtterm does not support 20ac as keysym ? try the following 1. create one file name tt which have one line: keycode 15 = e E EuroSign 2. xmodmap tt and now try it with both mozilla and dtterm. katakai- why does Sun map keysym 0xa4 to Euro sign?
they are some discussion about this issue on XFree86 1/2002- see http://xfree86.org/pipermail/i18n/2002-January/002857.html http://xfree86.org/pipermail/i18n/2002-January/002858.html http://xfree86.org/pipermail/i18n/2002-January/002859.html I think this is a invalid bug. Sun's approach to map keysym 0xa4 to euro sign are HACKY and will disable the support for keysym 0xa4 for it's design purpose. This violate the definitation in X11R6 and I think we should not do that.
>> Are you sure dtterm does not support 20ac as keysym ? I tried. In euro sign enabled locale, dtterm does not support 20ac keysym.
I'm now looking for this... I think the reason is that on Solaris 8 we don't have XK_EuroSign def in keysymdef.h of X11. New Solaris 9 has the definition and I think we should follow the standard solution... Anyway, I'll ask to i18n engineer about this.
frank, I add #ifdef SUNOS4 and SOLARIS to the previous patch. It will be more reasonable this time. Many users of Solaris will be thankful for that, if we support AltGraph+e to input euro. It will be better than nothing.
the second patch should obsolete the first one, who having that permission please help me to do that.
Attachment #71862 - Attachment is obsolete: true
Bolian: your patch is wrong, reagardless it is #ifdef SOLARIS or not. If sollaris really want to map that key to Euro sign, fix it in your xlib. don't propose hacky code in mozilla.
jdunn, This bug was in the Netscape6.2.2 SUN BRANCH, it should also be in the NETSCAPE_7_0_OEM_BRANCH, or regression will happen. This patch is important for SUN Solaris User to input euro in Netscape. It only affect the version on SUN Solaris Platforms. So, branchOEM+ is needed. Thanks, Bolian
Whiteboard: branchOEM
About the patch, I don't think mapping AltGraph+e input to EuroSign (0x20ac) merely with Mozilla is a right thing to do. You are still getting currency keysym (0xa4) with the rests of desktop applications, which I'm afraid would make things look very inconsistent to users. Note that you are still getting 0xa4 from AltGraph+e input even at dtterm of ISO8859-15 locales. But, it is just displayed with EuroSign glyph since you're using iso8859-15 encoded font which maps 0xa4 to EuroSign glyph. As it stands on curent Solaris8 and 9, a right way to input 0x20a4 with AltGraph+e is running desktop clients in UTF-8 locales. This works in any desktop clients consistantly.
Bolian: I forgot to ask you one more thing. The problem you're claiming is specific to ISO8859-15 locales? When you run Mozilla in ISO8859-15 locale, you get international currency sign displayed for 0xa4 while you get EuroSign displayed on other apps. It that the claim? If so, it sounds like it's possibily a charset ordering issue of fonts rather than input. But, I don't think it's the design of Mozilla text shaper to change ISO8859-X fonts for ASCII/Latin1-supplement code range according to the locale's encoding. Frank?
Hidetoshi, Thanks for evaluation. It seems that Frank insist that 0x20ac should be generated in order to input euro from Keyboard (see comment #5). Frank? If we generate 0xa4 (currency) from AltGraph+e, and map it into euro when needed according to LOCALE, like other applications in Solaris do, is that acceptable for Mozilla? Does Mozilla deal with the LOCALE issue, how? Thanks.
>It seems that Frank insist that 0x20ac should be generated > in order to input euro from Keyboard (see comment #5). Please note that I agree with Frank on this point above regarding to "input". You should not turn 0xa4 keysym to anything else in Mozilla. This kind of thing is not done in any other application on Solaris. > Frank? If we generate 0xa4 (currency) from > AltGraph+e, and map it into euro when needed according > to LOCALE, like other applications in Solaris do, is > that acceptable for Mozilla? Does Mozilla deal > with the LOCALE issue, how? Thanks. Note that "map 0xa4 into euro on Solaris apps" is done on font level, but not on input level, and it is a specific thing when you run apps on ISO8859-15 locales. And, what I mentioned "possibilly a charset ordering issue.." in my last comment is about font mapping but not about input. I said we *might* use ISO8859-15 fonts (where 0xa4 has Euro glyph) to draw(and print) ASCII/Latin-1 (0x20-0x7f, 0x81-0xff) *only when* Mozilla is running in ISO8859-15 locales. (I'm not insisting to do this, but just introduce it a possible option as a live example, which is actually taken on Solaris ISO8859-15 locales.) IMO: Mozilla's Unicode based, so character to be displayed should be subject to how Unicode book defines, where 0xa4 is CURRENCY SIGN and 0x20ac is EURO SIGN - and that's it. Introducing locale things to character renderng would make things more complicated than necessary.
OK, then the most direct and effective way is to file a bug in Solaris, Solaris should generate 0x20ac not 0xa4 keysym whenener a Euro is wanted, whether it use AltGraph+e or others. Then this bug can be closed here. Hidetoshi, Is that OK?
Solaris Xlib should fix this. bugtraq 4730547
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Whiteboard: branchOEM
Blocks: sunkeymeta
Whiteboard: SunKey
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: