[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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.


Reply to: