FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-05-2008, 09:10 AM
Michael Schwendt
 
Default Locale codeset UTF-8 vs. utf8

Default GNOME user in Fedora 9:

$ env|grep LANG
LANG=en_US.utf8
GDM_LANG=en_US.utf8

Logging in as superuser:

$ su -
# env|grep LANG
LANG=en_US.UTF-8

Switching back to normal user:

# su - user
$ env|grep LANG
LANG=en_US.UTF-8

The difference in the spelling of the codeset breaks Sylpheed (#450063)
which only looks for codeset "UTF-8". Now where again is it defined
that both are valid spellings for the codeset?

$ locale -a|grep utf8|wc -l
230
$ locale -a|grep UTF-8|wc -l
2

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 09:22 AM
Jakub Jelinek
 
Default Locale codeset UTF-8 vs. utf8

On Thu, Jun 05, 2008 at 11:10:59AM +0200, Michael Schwendt wrote:
> The difference in the spelling of the codeset breaks Sylpheed (#450063)
> which only looks for codeset "UTF-8". Now where again is it defined
> that both are valid spellings for the codeset?

Then Sylpheed is just broken. It shouldn't look at the locale name,
but instead at nl_langinfo (CODESET) (the same can be queried from
locale -k LC_CTYPE | grep ^charmap=
).
And, no matter what spelling you use in the .* part of locale name
in environment, CODESET is the same:

LC_ALL=en_US.UTF-8 locale -k LC_CTYPE | grep charmap
charmap="UTF-8"
LC_ALL=en_US.utf8 locale -k LC_CTYPE | grep charmap
charmap="UTF-8"
LC_ALL=en_US.utf-8 locale -k LC_CTYPE | grep charmap
charmap="UTF-8"
LC_ALL=en_US.UTF_8 locale -k LC_CTYPE | grep charmap
charmap="UTF-8"

Jakub

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 09:32 AM
Martin Sourada
 
Default Locale codeset UTF-8 vs. utf8

On Thu, 2008-06-05 at 05:22 -0400, Jakub Jelinek wrote:
> On Thu, Jun 05, 2008 at 11:10:59AM +0200, Michael Schwendt wrote:
> > The difference in the spelling of the codeset breaks Sylpheed (#450063)
> > which only looks for codeset "UTF-8". Now where again is it defined
> > that both are valid spellings for the codeset?
>
> Then Sylpheed is just broken. It shouldn't look at the locale name,
> but instead at nl_langinfo (CODESET) (the same can be queried from
> locale -k LC_CTYPE | grep ^charmap=
> ).
> And, no matter what spelling you use in the .* part of locale name
> in environment, CODESET is the same:
>
> LC_ALL=en_US.UTF-8 locale -k LC_CTYPE | grep charmap
> charmap="UTF-8"
> LC_ALL=en_US.utf8 locale -k LC_CTYPE | grep charmap
> charmap="UTF-8"
> LC_ALL=en_US.utf-8 locale -k LC_CTYPE | grep charmap
> charmap="UTF-8"
> LC_ALL=en_US.UTF_8 locale -k LC_CTYPE | grep charmap
> charmap="UTF-8"
>
> Jakub
>
Sounds sane, though I faced very similar problem with Evolution some
time back, when my e-mail written in Czech (with diacritic marks) was
delivered broken - because only Evolution was able to tell what utf8
charset actually is... Of course, manually setting it to UTF-8 fixed the
issue... I wondered whether the problem was due to wrong setting after
upgrading to Fedora 9 or something else, but I didn't pursued the issue
further.

Martin
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 09:34 AM
Michael Schwendt
 
Default Locale codeset UTF-8 vs. utf8

On Thu, 5 Jun 2008 05:22:51 -0400, Jakub Jelinek wrote:

> On Thu, Jun 05, 2008 at 11:10:59AM +0200, Michael Schwendt wrote:
> > The difference in the spelling of the codeset breaks Sylpheed (#450063)
> > which only looks for codeset "UTF-8". Now where again is it defined
> > that both are valid spellings for the codeset?
>
> Then Sylpheed is just broken. It shouldn't look at the locale name,
> but instead at nl_langinfo (CODESET) (the same can be queried from
> locale -k LC_CTYPE | grep ^charmap=
> ).

Thanks. Found it already while skimming over setlocale(3).

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 09:57 AM
Michael Schwendt
 
Default Locale codeset UTF-8 vs. utf8

On Thu, 05 Jun 2008 11:32:03 +0200, Martin Sourada wrote:

> Sounds sane, though I faced very similar problem with Evolution some
> time back, when my e-mail written in Czech (with diacritic marks) was
> delivered broken - because only Evolution was able to tell what utf8
> charset actually is... Of course, manually setting it to UTF-8 fixed the
> issue... I wondered whether the problem was due to wrong setting after
> upgrading to Fedora 9 or something else, but I didn't pursued the issue
> further.

What I remember is that "utf8" and "UTF-8" are equivalent when
setting the locale, but internally the codeset is "UTF-8" only.
The list of supported values is returned by

$ locale -m|grep -i utf
UTF-8

which is what to use in string-comparison after querying nl_langinfo(CODESET).

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 07:39 PM
Enrico Scholz
 
Default Locale codeset UTF-8 vs. utf8

Michael Schwendt <mschwendt@gmail.com> writes:

> Default GNOME user in Fedora 9:
>
> $ env|grep LANG
> LANG=en_US.utf8
> GDM_LANG=en_US.utf8

Session setup seems to be broken in F-9; e.g. compare output of

| ssh `hostname` set

on F-9 and F-8 host. A similar defect seems to happen when xfce4 is
started from kdm: on F-9, profile settings ($LANG, $PATH) are missing
for applications started by panel applets or by A-F2.



Enrico

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 02:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org