Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#4433 - locale -a reports nb_NO.utf8 instead of nb_NO.UTF-8

Attached to Project: Arch Linux
Opened by kongokris 2 (nut543) - Monday, 10 April 2006, 17:49 GMT
Last edited by Jan de Groot (JGC) - Thursday, 15 June 2006, 12:57 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

continued from topic: the only uncommented entry in /etc/locale.gen looks like: nb_NO.UTF-8 UTF-8

when my LANG is sat to nb_NO.utf8 i get errors similar to the guy in this thread: http://bbs.archlinux.org/viewtopic.php?p=156205#156205

when i set it to nb_NO.UTF-8 the errors/warnings dissapear, but why does locale -a report wrongly?

when i do 'strings /usr/lib/locale/locale-archive' i get(and sorry for the long output but please don't scream about it):
nb_NO.utf8
upper
lower
alpha
digit
xdigit
space
print
graph
blank
cntrl
punct
alnum
combining
combining_level3
toupper
tolower
totitle
UTF-8
UUUUUUU
TUUUUU+
UUUUUUU
UUUU
TUUUUUU
*UUUU
UUUUUUUUUUUUUUUUUU
UUUUUUUUUUU
$B*!Q
&'()*+,-.
/0123456789:;<=>?@
BCDEFGHIJK
"#$
LNPRTVXZ\^`bdfhjlnprtvxz|~
MOQSUWY[]_acegikmoqsuwy{}
UTF-8
UTF-8
ndag
mandag
tirsdag
onsdag
torsdag
fredag
rdag
januar
februar
mars
april
juni
juli
august
september
oktober
november
desember
%a %d-%m-%Y %T %Z
%d-%m-%Y
%a %b %e %H:%M:%S %Z %Y
UTF-8
NOK
NOK
UTF-8
^[JjYy].*
^[Nn].*
UTF-8
UTF-8
%d%t%g%t%m%t%f
UTF-8
%f%N%a%N%d%N%b%N%s %h %e %r%N%%z %T%N%c%N
UTF-8
+%c %l
UTF-8
UTF-8
Norwegian (Bokmal) locale for Norway
Norsk Standardiseringsforbund
University Library,, Drammensveien 41, N-9242 Oslo, Norge
bug-glibc-locales@gnu.org
Norwegian, Bokm
Norway
2000-06-29
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
nb_NO:2000
UTF-8

so any ideas? where does the bug lay here? at the locale guy or applications or archlinux or..
This task depends upon

Closed by  James Rayner (iphitus)
Sunday, 15 October 2006, 07:55 GMT
Reason for closing:  Won't fix
Comment by Benjamin Andresen (klapmuetz) - Saturday, 10 June 2006, 13:16 GMT
am I correct that this ticket is a duplicate to this one:

http://bugs.archlinux.org/task/4703
?

That would mean that this problem has been fixed.
Comment by kongokris 2 (nut543) - Thursday, 15 June 2006, 13:06 GMT
I think the problem(as i really don't remember anymore) here is that

kris|~$ locale -a
C
nb_NO.utf8
POSIX

gives me the entry 'nb_NO.utf8' when, to get it to work, i need to set it to 'nb_NO.UTF-8' in rc.conf and 'nb_NO.UTF-8 UTF-8' in /etc/locale.gen.
I could try to change it back to nb_NO.utf8 in rc.conf and see if the errors come back? But the point is that locale -a reports the wrong value isn't it?
Comment by Jan de Groot (JGC) - Thursday, 15 June 2006, 14:08 GMT
The setting in rc.conf can be written in both ways, the system will insert or remove dashes where needed itself somehow (try: LANG=nb_NO.utf8 gcalctool or with LANG=nb_NO.UTF-8 gcalctool, both will give nb_NO with utf8 charsets.
Comment by kongokris 2 (nut543) - Thursday, 15 June 2006, 15:08 GMT
I don't have gcalctool but, when i run:

kris|~$ LANG=nb_NO.utf8 xfontsel
Warning: locale not supported by Xlib, locale set to C

and when i run:

LANG=nb_NO.utf8 kcalc
Qt: Locales not supported on X server

Both run fine with no errors/Warnings with LANG=nb_NO.UTF-8 infront.
Comment by kongokris 2 (nut543) - Thursday, 15 June 2006, 15:09 GMT
so the system is obviously not doing that in this case.
Comment by kongokris 2 (nut543) - Thursday, 22 June 2006, 16:32 GMT
*LANG if there ever was a doubt.
Comment by Jan de Groot (JGC) - Thursday, 22 June 2006, 17:09 GMT
Hmm, this did work with nl_NL.utf8 and nl_NL.utf-8, but indeed, it fails for norwegian language settings. So the best option here is stop relying on locale -a and use the locales defined in /etc/locale.gen. This should be stated in the manual pages, documentation, rc.conf etc.
Comment by Damjan Georgievski (damjan) - Sunday, 30 July 2006, 23:07 GMT
Glibc internally "normalizes" the charset part of the locale names. The normalization process makes all the letters to lowercase and removes all non-alphanumeric characters.

This is a leftover from the time when people were using charset names like: iso-8859-1, ISO_8859_2, ISO8859-3 etc. since there was never a standard about those charsets. Glibc would internally hold the name "iso88591" and normalize the LANG variable when matching the locale name.

Now... applications should never *NEVER* use the locale name directly. Glibc has an API for getting the charset name and all the other usefull info about a locale. Unfortunetally X has long had it's own locale sub-system... but I beleive nobody uses it anymore (I even think, they marked it obsolete and should be removed in some future version).

To conclude, this "problem" is outside the scope of ArchLinux, so probably this bug should be closed "wont fix".

Loading...