Re: changing to UTF-8



On Fri, Jun 05, 2009 at 06:08:01PM -0400, Andrew Schulman wrote:
Thank you both for your help.

You could try cleaning things up a bit with 'localepurge'

Looking at the package description, this doesn't seem like a good idea. And
anyway, my problem isn't that I have too many locales. It seems to be a
font problem.

$ sudo dpkg-reconfigure locales

Yes, I have tried this. It resets /etc/locale.gen.

$ cat /etc/default/locale
LANG="en_US.UTF-8"

$ cat /etc/default/locale
# File generated by update-locale
LANG=en_US

So your system default is not UTF-8 locale.

I get the same result if it's LANG=en_US.UTF-8.

Did you reboot? This is a file which set default locale.

(I know we do not need to reboot to fix this ... but this is simpler to explain.)

$ env |egrep "(^LC|LANG)"
LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8

$ env |egrep "(^LC|LANG)"
LANG=en_US

Now your system is acting as non-UTF-8 locale now.

$ cat ~/.dmrc
[Desktop]
Session=gnome

$ cat ~/.dmrc
[Desktop]
Session=default

And note that I have

$ locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

non-UTF-8

$ locale -a
C
en_US
en_US.iso88591
en_US.utf8

Now you have capability to set to UTF-8

POSIX

$ egrep -v '^(#|$)' /etc/locale.gen
en_US UTF-8
en_US.ISO-8859-1 ISO-8859-1
en_US.UTF-8 UTF-8

All of this is as it's supposed to be. I try switching between en_US and
en_US.UTF-8, but it doesn't help. I still see characters such as hyphens
(-), boldface pipes, and single quotes rendered as â (circumflex-a) in my
terminal windows. If I set LANG=en_US.ISO-8859-1, then the characters are
shown correctly.

I think this is a font problem, but I just don't know how to diagnose it.

No.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: UTF-8
    ... For instance, if your UTF-8 represents Chinese characters, and your locale ... Here's a bit of code that will convert between UTF-8 from a file and Unicode ...
    (microsoft.public.vb.general.discussion)
  • Re: Re: Problem with xmms on debian etch 4.0 stable
    ... and configured the locale as english and it started working ... 'en_IN UTF-8', restarted the system, and the problem is solved. ... appears that the problem is related to what is mentioned in bug #334040 ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: ISO-8859-1 and gnome-terminal in Ubuntu
    ... UTF-8 by default and the mutt wiki suggests we should use 8859. ... Since almost every mail I get comes with 8859 charset and I was having ... Locale settings, what results do you get if you type "locale" in ...
    (comp.mail.mutt)
  • setenv locale / utf-8
    ... UTF-8 mails by another server. ... I checked my installed locales with locale -a. ... Now I got the following warnings if I'm trying to execute a perl script: ... perl: warning: Setting locale failed. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: ???????????????
    ... - he is running slrn in a UTF-8 locale ... When running e.g. in a iso-8859-1 locale there is no way to translate ... chinese characters into iso-8859-1 characters. ... locale on my own computer to UTF-8 was a Japanese sig file in another ...
    (news.software.readers)