Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't configure locale with UTF [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 197

PostPosted: Wed Oct 29, 2014 12:34 pm    Post subject: Can't configure locale with UTF [Solved] Reply with quote

Hello to everyone (sorry by my English)), I write you because can't find a manner to correctly configure the locale.
I did read a lot of documents, because the issue is super-treated, but don't know what I do wrong. I can't make that the system work. Perhaps somebody could help me a bit, because i have several days wasted on it.

I can't set the system idiom (spanish) to UTF, or that the files recorded in pendrives from Windows show its special characters in the right way. I can't set the GUI to my native lenguage in UTF and the worst, when I try to update some programs, for example perl and glibc I obtain the next warning:

Code:

# perl-cleaner --reallyall

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LC_MONETARY = "es_ES.UTF-8@euro",
   LC_COLLATE = "C",
   LC_CTYPE = "es_ES.utf8",
   LANG = "es_ES.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:


Next I show the content from the main files and the steps that I did follow to configure

Code:
   
cat /etc/locale.nopurge

# Following locales won't be deleted from this system
# for example:


es_ES.UTF-8

# localepurge

# cat /etc/locale.gen


es_ES.UTF-8 UTF-8

# locale-gen  (I do not use LC_ALL because the documents say that is a mistake do it)
# cat /etc/env.d/02locale
LANG=es_ES.utf8       
LC_COLLATE=C
LC_CTYPE=es_ES.utf8

# eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   POSIX
  [3]   es_ES.utf8 *
  [ ]   (free form)


# locale -a
C
POSIX
es_ES.utf8

# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=es_ES.UTF-8
LC_CTYPE=es_ES.utf8
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE=C
LC_MONETARY=es_ES.UTF-8@euro
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8
Código:   "
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

env-update && source /etc/profile


From here I try to recompile perl or glibc, but I obtain the error described at the beginin of the post. I interrupt the process before finish, because I assume that is on the wrong way


Documents I have followed

http://www.gentoo-wiki.info/Locales
http://wiki.gentoo.org/wiki/Localization/HOWTO/es
and like 10 more form this page.

I can't find what is wrong, please a little of help

Regards and thanks in advance


Last edited by Yczo on Wed Oct 29, 2014 3:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Oct 29, 2014 1:11 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-7583970.html#7583970
Have a look
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 197

PostPosted: Wed Oct 29, 2014 2:04 pm    Post subject: Reply with quote

Thank you very much for answer.

Switch the extension .utf8 for .UTF-8 did not work for me

Code:

# cat /etc/env.d/02locale

LANG="es_ES.UTF-8"
LC_COLLATE="C"
LANGUAGE="es_ES.UTF-8"
LC_CTYPE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8@euro"

 # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   POSIX
  [3]   es_ES.utf8
  [4]   es_ES.UTF-8 *
  [ ]   (free form)

# env-update && source /etc/profile

# perl-cleaner --reallyall
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),



sad
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Oct 29, 2014 2:15 pm    Post subject: Reply with quote

did you run locale-gen?

You may remove first this before running locale-gen and the other requirements to build locale
Quote:
[3] es_ES.utf8
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Oct 29, 2014 2:26 pm    Post subject: Re: Can't configure locale with UTF Reply with quote

Yczo wrote:

# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=es_ES.UTF-8
...
Código: "
...
LC_ALL=

That Código part isn't good, you can use <Código = > or <Código = ""> but <Código = "> (one quote) or <Código :> isn't valid

What Código mean :)
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 197

PostPosted: Wed Oct 29, 2014 2:29 pm    Post subject: Reply with quote

Thank you krinn

I can't remove [3] es_ES.utf8

Code:

# cat /etc/locale.nopurge

es_ES.UTF-8

# localepurge
 * localepurge: processing locale files in /usr/share/locale ...
 * localepurge: processing locale files in /usr/lib/locale ...
 * localepurge: processing locale files in /usr/share/binutils-data/x86_64-pc-linux-gnu/2.23.2/locale ...
 * localepurge: processing locale files in /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/locale ...
 * localepurge: processing man pages in /usr/share/man ...
 * localepurge: processing man pages in /usr/man ...
 * localepurge: processing man pages in /usr/local/share/man ...

 * Total disk space freed by localepurge: 0K

# locale-gen
 * Generating 1 locales (this might take a while) with 1 jobs
 *  (1/1) Generating es_ES.UTF-8 ... [ ok ]
 * Generation complete



but nothing seems change

Code:


# env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...

# locale -a
C
POSIX
es_ES.utf8

 # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   POSIX
  [3]   es_ES.utf8
  [4]   es_ES.UTF-8 *
  [ ]   (free form)
 #

Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Oct 29, 2014 2:33 pm    Post subject: Reply with quote

Last user i have help with UTF8 was getting crazy because he has put some settings in his bashrc
Check you didn't put something in it too
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 197

PostPosted: Wed Oct 29, 2014 2:39 pm    Post subject: Reply with quote

I don't have this file :-(

# cat ~/.bashrc
bash: /root/.bashrc: No such file or directory

$ cat ~/.bashrc
bash: /home/enigma/.bashrc: No such file or directory
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Oct 29, 2014 2:43 pm    Post subject: Reply with quote

1/ did ls per example output in spanish?
2/ perl error is complain that a list of variable are not install in your system, and from that list we can see LC_MONETARY = "es_ES.UTF-8@euro" but nowhere we can see where you create this one (es_ES.UTF8 doesn't becomes es_ES.UTF8@euro by just adding @euro next to it, you need to generate it)
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 197

PostPosted: Wed Oct 29, 2014 3:25 pm    Post subject: Reply with quote

ok... thank you very much, the perl problem is solved adding to /etc/locale.gen the second line
Code:

es_ES.UTF-8 UTF-8
es_ES.UTF-8@euro UTF-8


But, which is the purpose of that?... both have the same UTF-8 code symbol. Why don't use then LC_MONETARY="es_ES.UTF-8" instead? . I know that euro symbol and other special characters are in ISO-8859-15


Must I use es_ES@euro ISO-8859-15 and LC_MONETARY=es_ES@euro?

Must I generate all codes?

Code:

 
 es_ES ISO-8859-1 #spanish without euro
 es_ES@euro ISO-8859-15 #spanish with euro and special characters
 es_ES.UTF-8 UTF-8
 es_ES.UTF-8@euro UTF-8  #Which is the purpose of that? same as es_ES.UTF-8


for don't have symbol compatibility problems with files in pendrives from windows or other distros?

thanks in advance
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Oct 29, 2014 3:34 pm    Post subject: Reply with quote

Someone should confirm you that, but i don't think UTF need any specials for @ symbol. I have a stock fr_FR-UTF myself and never got trouble with euro symbol.
While other like ISO something might need an extra for the euro symbol.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2642

PostPosted: Wed Oct 29, 2014 3:40 pm    Post subject: Reply with quote

Yczo wrote:
Must I use es_ES@euro ISO-8859-15 and LC_MONETARY=es_ES@euro?
You'll find more information using
Quote:
$ cat /etc/locale.gen
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Wed Oct 29, 2014 3:44 pm    Post subject: Reply with quote

I use a spanish locate and my locale.gen is like this

Code:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
es_ES@euro ISO-8859-15
es_ES.UTF-8 UTF-8


I need the 8859 stuff because sometimes I program Qt stuff that must run in bot Linux and Windows XP and have to deal with that kind of string still. But otherwise I have no use for that.

My locale settings are as follow:

/etc/env.d/02locale wrote:

# Configuration file for eselect
# This file has been automatically generated.
LANG="es_ES.utf8"


eselect locale list wrote:

Available targets for the LANG variable:
[1] C
[2] en_US
[3] en_US.iso88591
[4] en_US.utf8
[5] es_ES@euro
[6] es_ES.iso885915@euro
[7] es_ES.utf8 *
[8] POSIX
[ ] (free form)


locale wrote:

LANG=es_ES.utf8
LC_CTYPE="es_ES.utf8"
LC_NUMERIC="es_ES.utf8"
LC_TIME="es_ES.utf8"
LC_COLLATE="es_ES.utf8"
LC_MONETARY="es_ES.utf8"
LC_MESSAGES="es_ES.utf8"
LC_PAPER="es_ES.utf8"
LC_NAME="es_ES.utf8"
LC_ADDRESS="es_ES.utf8"
LC_TELEPHONE="es_ES.utf8"
LC_MEASUREMENT="es_ES.utf8"
LC_IDENTIFICATION="es_ES.utf8"
LC_ALL=


English locales are mostly unused, since for bugreports I usually use the C locale.

Nowadays there's not much setup to do in Gentoo to get utf8 locales. I remember it used to be a nightmare. So, I would start by simplifying the thing a bit. Maybe your are over-configured it. Of course, double check that you have USE="nls unicode" in your make.conf and that all package are compiled using that.

Also, I have no idea if spelling of utf8 matters these days. Note that I use uppercase with hyphen but eselect outputs lowercase without hyphen. In any case, that's my setup, and it works with perl and all.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 197

PostPosted: Wed Oct 29, 2014 3:53 pm    Post subject: Reply with quote

Thank you very much everybody!!

At last I have understood!! :) :) :) :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum