GNOME Bugzilla – Bug 79852
Euro Symbol doesn't display
Last modified: 2009-08-15 18:40:50 UTC
Typing a euro doesn't display one on screen. Setup: font: -misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-15 (set by gconf-editor) xmodmap: keycode 26 = e E EuroSign expected: Type a Euro (Alt-GR e) See a Euro on screen Actual: Type a Euro (Alt-GR e) See nothing (cursor doesn't move at all) If I change the xmomdap: xmodmap: keycode 26 = e E currency It shows a space, but there's something there. If I try to copy it, I get: Selection retireval failed.
Are you in an iso8859-15 locale? Check stderr for warnings about font not matching locale.
yup... current locale is LANG=en_IE@euro ...=en_IE@euro I don't get any messages in .xsession-errors about fonts from gnome-terminal. I get an esd error, but that's not related. It only seems to be gnome-terminal with the problem (it works in nautilus for example). (hmm. Just tried to copy what should have been a Euro in the xev output, and I got an error message: Error converting from UTF-8 to 'ANSI_X3.4-1968': Invalid byte sequence in conversion input Error converting from UTF-8 to STRING: Invalid byte sequence in conversion input) (xev: It sees a Euro inputted, and looks it up okay (1 character) in gnome-1 gnome-terminal it shows: XLookupString gives 1 characters: "€" in gnome-2 gnome-terminal it shows: XLookupString gives 1 characters: "" (There is something between the " but it's not shown)
You may be getting bit by this bug: http://bugzilla.gnome.org/show_bug.cgi?id=79529 ANSI_X3.4-1968 indicates that GLib thinks it's in ASCII mode. If adding the line "setlocale(LC_ALL, "");" to the top of main() in terminal.c in gnome-terminal fixes it, then this is the problem.
did that.. added it just before the bindtextdomain lines. didn't make any difference. (If it means anything: echo € > /tmp/output and catting /tmp/output in Eterm works).
ETerm doesn't mean anything, it's ignoring the locale encoding. Maybe put this in just after the setlocale(): { const char *charset; g_get_charset (&charset); g_print ("Running in locale \"%s\" with encoding \"%s\"\n", setlocale (LC_ALL, NULL), charset); } Also, be sure the setlocale(LC_ALL, "") doesn't return NULL. Hmm.
did that: ret = setlocale(LC_ALL, ""); printf("setlocal did %sreturn NULL\n", NULL == ret ? "": "not "); g_get_charset(&charset); g_print("Running in locale \"%s\" with encoding \"%s\"\n", setlocale(LC_ALL,NULL), charset); result: lbedford@triton:/gnome/head/cvs/profterm$ /gnome/head/INSTALL/bin/gnome-terminal setlocal did not return NULL Running in locale "en_IE@euro" with encoding "ISO-8859-15"
Hmm.. I kinda disagree with the rating of this bug. (I'm not sure of the definitions of minor/normal etc though). This affects everyone in Europe (and the rest of the world) who needs to type a € in a text app (vi, mutt, etc)... L.
Don't worry about the rating, I think it's actually a dup of some other bugs in here about international text display but haven't tracked any of them down enough to know what the bug really is yet. I wonder if the font you're using has a Euro glyph, even though it advertises ISO-8859-15. Can you see other Latin chars, like a-with-accent? If you look at the font with "xfd" and see if there's a Euro glyph displayed?
It's the same font requested in the gnome-1 and gnome-2 terminals. I set the string by hand (I won't mention the fact that the font selector in gnome-2 doesn't allow you to select -15). xfd -fn -misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-15 gives me all the glyhs, and it goes: <upside down !> <cent> <sterling> <Euro> and I can see all of them.
Moving to libzvt.
*** Bug 60875 has been marked as a duplicate of this bug. ***
Hidetoshi, lbedford: is this fixed in the libzvt-i18n branch?
Yes. It display EuroSign for 0xa4 in iso8859-15 locales, and for 0xc2a4 in UTF-8 locales.
I think we can close this bug for now.