You are not logged in.

#1 2009-01-14 11:53:57

slyson
Member
Registered: 2008-03-23
Posts: 24

[Solved] Characters not displaying correctly in some applications

When I read things in applications like Firefox I've noticed that sometimes the " symbol is displayed wrong. Sometimes it is shown as what I can only describe as two forward-ticks stuck together (it won't let me paste it), and other times as two back-ticks ``. When I try to paste code over to the rxvt-unicode terminal the forward-tick symbol is displayed as a question mark, as are some other special symbols like maths characters. So I have two questions: are there any terminals that support such special characters? And is my character display problem related to setting up my locales correctly (which I think I already have)?

I followed the steps on the wiki for setting up locales. I uncommented "en_GB.UTF-8 UTF-8" and "en_GB ISO-8859-1" in /etc/locale.gen, ran locale-gen as root, and added  LOCALE="en_GB.utf8" to /etc/rc.conf and "export LANG=en_GB.utf8" to my .zshrc. locale -a shows that the correct locales are installed.

Last edited by slyson (2009-06-16 15:20:18)

Offline

#2 2009-06-16 15:18:16

slyson
Member
Registered: 2008-03-23
Posts: 24

Re: [Solved] Characters not displaying correctly in some applications

See this pdf for fixes: unix.derkeiler.com/pdf/Mailing-Lists/Fr … g00564.pdf.

Type 'locale' on the console to find out your locale. Mine is en_GB.utf8.

Now add the following to your shell profile or ~/.xinitrc.

I already had this in my .zshrc:

export LANG=en_GB.utf−8

But I think the LC variable was overriding it. I Changed my LC_ALL to:

export LC_ALL=en_GB.utf8

(It was set to LC_ALL=C before).

The above fixes copy/paste to most terminal apps, but some still misbehave. For example, I had to add this to ~/.emacs:

;; Set language environment for MULE.
(set−language−environment 'UTF−8)
;; My customization for text modes
(defun my−text−mode−hook ()
(auto−fill−mode 1)
(show−paren−mode t)
(activate−input−method 'rfc1345) ; Good input method for UTF−8
)
(add−hook 'text−mode−hook 'my−text−mode−hook)

More examples are given on page 3 of the pdf.

Last edited by slyson (2009-06-16 15:26:31)

Offline

Board footer

Powered by FluxBB