Bug 596664

Summary: locale.alias should include nb_NO.utf8 and nn_NO.utf8
Product: [Fedora] Fedora Reporter: Dag Bjerkeli <dag>
Component: libX11Assignee: Søren Sandmann Pedersen <sandmann>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: albertczyk, i18n-bugs, jmccann, kem, kvikende, mcepl, petersen, rstrode, sandmann, tagoh
Target Milestone: ---Keywords: EasyFix, MoveUpstream, Patch, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-11 06:02:16 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:

Description Dag Bjerkeli 2010-05-27 09:26:34 UTC
Description of problem:
Input of Norwegian characters in some components does not work.
Unable to use dead keys overall

Components tested is:
gedit
gnote
nautilus

Input does work in
Firefox (æøå)
OpenOffice
gnome-terminal


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


How reproducible:
Always

Steps to Reproduce:
1. Install F13 with Norwegian setup (keyboard and language)
2. Start gedit
3. Try to write Norwegian characters

Actual results:
There is "no reaction" in gedit

Expected results:
The Norwegian characters should appear


Additional info:
Dead keys does not work properly either. Unable to produce
~ above O. Does not work i Firefox or OpenOffice either.
Swedish characters like .. above O is also impossible to
produce, the .. should be one character, but unable to produce that now.

Comment 1 Jens Petersen 2010-05-27 09:39:44 UTC
gtk2-immodule-xim

Comment 2 Jens Petersen 2010-05-27 10:33:19 UTC
I can kind of reproduce on my test machine,
but not from a F13 Live instance.

Comment 3 Dag Bjerkeli 2010-05-27 12:01:16 UTC
(In reply to comment #2)
> I can kind of reproduce on my test machine,
> but not from a F13 Live instance.    

I installed from DVD-iso. Please let me know if there is anything I can provide to solve this.

Noticed that in Netbeans 6.8 all keys are working as expected. Starting
netbeans with
LANG=no_NO.utf8 /usr/local/netbeans-6.8/bin/netbeans --laf javax.swing.plaf.metal.MetalLookAndFeel

Comment 4 Dag Bjerkeli 2010-06-09 12:14:14 UTC
I've looked some further into this. From what I can see the user created during installation get this LANG env. setup:
LANG=nb_NO.utf-8

Root user, and user created after system is up and running gets this:
LANG=nb_NO.UTF-8

Notice the difference in case for UTF.

This have been tested on a fresh installation of FC13. Since I've got no clue on
where this setting comes from, I've created an entry in .bash_profile with

export LANG=nb_NO.UTF-8

I'm considering this as an workaround since I now got my Norwegian chars where I want them.

Comment 5 Kvikende 2010-06-10 12:37:46 UTC
I have the same issue with Norwegian Nynorsk, however I can write the special characters in Firefox (but not in rest of GNOME).

I can also confirm that doing a "export LANG=nn_NO.UTF-8" helped.

Comment 6 Alberto 2010-06-17 19:23:09 UTC
I have the same problem in F12 (yes, I know this bug is for F13) but it looks like the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=468590, which is closed, but it seems to keep popping up again in each release.

Comment 7 Kvikende 2010-06-17 19:44:21 UTC
This is in GNOME applications though. Didn't read too closely.

Comment 8 Alberto 2010-06-17 19:55:42 UTC
Ooops... Anyway, the problem might affect both QT and GTK based apps, as it seems to be related to SCIM. In fact, I've just 'solved' it with 'yum remove scim*'

Comment 9 Kvikende 2010-06-24 08:12:32 UTC
This is also the case for nn_NO.utf-8!

Comment 10 Jens Petersen 2010-08-09 06:40:41 UTC
So what was the conclusion?

I am still puzzled:

- why .utf-8 occurred
- why removing scim helped

Is it reproducible in a fresh a/c?

Comment 11 Kvikende 2010-08-09 11:42:54 UTC
No idea what an a/c is so I can't test. 

It is present on my laptop, and putting "export LANG=nn_NO.UTF-8" in .bash_profile works but not when resuming from suspend.

I'm waiting to install F13 on one machine until this is fixed.

Comment 12 Jens Petersen 2010-08-19 04:21:36 UTC
Sorry by a/c meant a user account.

Comment 13 Kvikende 2010-08-19 06:31:44 UTC
I created a new account, left its language to Nynorsk and writing æøå in gedit worked.

I then logged out and changed the language to Bokmål and æøå didn't work in gedit anymore.

I then changed back to Nynorsk and æøå didn't work in gedit.

So it is still present.

Comment 14 Jens Petersen 2010-08-20 06:55:52 UTC
Thanks for the reproducer. :-)

(Well I can't reproduce the locale encoding ".utf-8".)

But I see the keyboard input problem: pretty bad, sorry.

Can you please test with
 https://admin.fedoraproject.org/updates/imsettings-0.108.1-2.fc13
?
It fixes the problem for me.

Anyway two workarounds, either:

1) avoid using xim with gtk (currently it is default)
$ GTK_IM_MODULE=gtk-im-context-simple gedit
Above update takes this approach and so will F14.

or

2) use a valid X locale
$ LANG=nb_NO.UTF-8 gedit

I dunno why gdm is still promoting invalid X locales... :-/

Comment 15 Jens Petersen 2010-08-20 07:13:59 UTC
Ok finally worked it out:

/usr/share/X11/locale/locale.alias lists no_NO.utf8
but not aliases for nb_NO.utf8 and nn_NO.utf8,
hence the above behaviour.

http://cgit.freedesktop.org/xorg/lib/libX11/tree/nls/locale.alias.pre

Following lines need to be added:

nb_NO.utf8:					no_NO.UTF-8

nn_NO.utf8:					no_NO.UTF-8

Comment 16 Jens Petersen 2010-08-20 07:40:22 UTC
(In reply to comment #15)
Rather:

nb_NO.utf8:     nb_NO.UTF-8

nn_NO.utf8:     nn_NO.UTF-8

of course.  Thanks Tagoh-san for pointing out my mistake.

Comment 17 Kvikende 2010-08-20 08:04:31 UTC
I installed the imsettings update (it wasn't in updates-testing so had to manually install imsettings-lib then imsettings), created a new account and rebooted the machine.

Logging into default nynorsk worked. Changing to bokmål worked. Changing back to nynorsk worked.

I am confident that update fixes this issue. :) Thanks for fixing it. Now get it updated for everyone! :D

Comment 18 Matěj Cepl 2010-08-23 15:45:05 UTC
Reporter, could you confirm that the issue has been resolved via workaround in the comment 16, please?

Thank you

Comment 19 Jens Petersen 2010-08-24 00:45:39 UTC
Anyway let's keep the bug open until the real fix goes into libX11.

Comment 20 Jens Petersen 2010-08-24 01:10:12 UTC
I posted a patch upstream: https://bugs.freedesktop.org/show_bug.cgi?id=29773

Comment 21 Dag Bjerkeli 2010-08-25 06:45:27 UTC
I removed the entry I had in .bash_profile:
#export LANG=nb_NO.UTF-8

Added entries from Comment 16 to /usr/share/X11/locale/locale.alias
# Test
nb_NO.utf8:     nb_NO.UTF-8
nn_NO.utf8:     nn_NO.UTF-8

Did a reboot, stated gedit and there were Norwegian signs. To confirm that the entries really did the trick, I commented them out in /usr/share/X11/locale/locale.alias

# Test
#nb_NO.utf8:     nb_NO.UTF-8
#nn_NO.utf8:     nn_NO.UTF-8

Reboot and new test with gedit. And it still worked.

Comment 22 Akira TAGOH 2011-05-24 12:50:34 UTC
This issue seems fixed in f15 though, any chance to get a backport in f13 and f14?

Comment 23 Bug Zapper 2011-06-02 13:16:47 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 24 Dag Bjerkeli 2011-06-03 07:10:52 UTC
As far as could tell, the problem were solved by the provided patch. And I have not experienced the problem after. Fresh install of FC14 have not displayed the bug for me.

Dag

Comment 25 Akira TAGOH 2011-11-11 06:02:16 UTC
As per comment#22 and f14 is about to reach EOL, closing this.