Certain Characters Not Displaying Correctly in Terminal

How it's supposed to look:

The man utility formats and displays the on-line manual pages. This ver-sion knows about the MANPATH and PAGER environment variables, so you can have your own set(s) of personal man pages and choose whatever program you like to display the formatted pages. If section is specified, man only looks in that section of the manual. You may also specify the order to search the sections for entries and which preprocessors to run on the source files via command line options or environment variables. If enabled by the system administrator, formatted man pages will also be compressed with the ``/usr/bin/gzip -c'' command to save space.

How it looks on my system (italics added to highlight the offending instances):

The man utility formats and displays the on-line manual pages. This verâsion knows about the MANPATH and PAGER environment variables, so you can have your own set(s) of personal man pages and choose whatever program you like to display the formatted pages. If section is specified, man only looks in that section of the manual. You may also specify the order to search the sections for entries and which preprocessors to run on the source files via command line options or environment variables. If enabled by the system administrator, formatted man pages will also be compressed with the â/usr/bin/gzip -câ command to save space.

If I were to type the above paragraph myself, and then save it as a text file, read it back through vim/less/more/cat, then characters such as ' and " would appear as intended, rather than being replaced with â.

Output of % echo $LANG:

Code:
en_US.UTF-8

.zshrc LANG stuff:

Code:
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
export LC_CTYPE=C

.Xdefaults font setting:

Code:
URxvt*font:-*-courier-*-r-*-*-*-140-*-*-*-*-*-*

NOTE: The same problem occurs regardless of whether I'm using any combination of urxvt + csh/zsh or xterm + csh/zsh. The problem does not occur in applications such as gvim, firefox, opera, etc.

The problem does not occur with new or old user-created text files, but does occur when using, for e.g, newsbeuter to pull in articles+feeds, or vim to pull in twitter feeds:



It is difficult to conceive of a more lame response than that. The first point is essentially that they will not regulate the pharmacies because they agreed to regulate themselves. That is as reassuring as a career criminal promising a judge that heâs sorry and wonât commit crimes anymore. How about a nice hefty fine as incentive, and to let the industry know that regulation is serious and has teeth? Now they have every reason to believe that regulation is not to be feared.

=============

Any help would be very much appreciated.
 
I had a similar problem when $LANG was set to en_CA.UTF-8. I have a note to myself to instead put the following in ~/.login_conf

Code:
me:\
        :charset=utf-8:\
        :lang=en_CA.UTF-8:

Don't forget to run % cap_mkdb .login_conf


See login.conf(5) for details.
 
Thanks for your reply :) Following your suggestion, I created my own login.conf with the following entry:

Code:
me:\
        :charset=utf-8:\
        :lang=en_US.UTF-8:

The problem still remains, however :(

As for 'unsetting' my LANG and LC_* variables, I do not know how to do this. I couldn't find anything in the documentation, or through Google search.
 
purgatori said:
As for 'unsetting' my LANG and LC_* variables, I do not know how to do this. I couldn't find anything in the documentation, or through Google search.

Just comment them out in your .zshrc so they don't get set in future sessions. You can also do, for example,

% unset LANG

The next thing you should do is run

% cap_mkdb .login_conf

Note the name of the file: .login_conf. I mistakenly called it .login.conf before. You should now see a file in your home directory called .login_conf.db.

Now, when I start a shell session, I see variables such as those below.

Code:
MM_CHARSET=utf-8
LANG=en_CA.UTF-8

and characters are displayed correctly.
 
Thanks so much for your help! I followed the steps you outlined, and while the output I now get is:

Code:
%locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

Code:
echo $LANG
(no value returned)

... characters now display correctly, so I don't care :D
 
Back
Top