LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-18-2018, 10:15 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Unable to display mailx messages with the correct codeset


I use mailx 12.5 as my email client with a command line. I'm having trouble with some characters in the message. For example, I have a email with a subject line (raw): Subject: =?UTF-8?Q?_RE:_Retiree=e2=80=99s_Dinner?=

If in .mailrc I have, "set ttycharset=ISO-8859-1", the subject is rendered, "RE: Retiree???s Dinner".

If in .mailrc I have, "set ttycharset=UTF-8", the subject is rendered, "RE: Retireeâs Dinner".

I don't seem to be able to show this as an apostrophe!

Note that the UTF-8 code for the right-apostrophe is e28099. The html code (not sure what codeset that is) for â is #224 or 0xe2. So it appears that when the mailx ttycharset is set to UTF-8 it is rendering only the first byte of the 028099 sequence.

It doesn't seem to matter what I have my locale set to.

This may not be mailx's fault. When I have my locale set to en_US.UTF-8 and do 'man mailx' (any manpage), I have what should be bulleted paragrahps:
Code:
       ·      An argument can be enclosed between paired double-quotes  ""  or
Which gets rendered:
Code:
       ·      An argument can be enclosed between paired double-quotes  ""  or
hex-dumping the man page shows the bullet as 0xc2b7 which is the UTF-8 codes for 'middle-dot'. However, my rendering is · which are the html codes c2 and b7 which are 'circumflex accent' (c2) and 'middle dot' (b7) respectively. So, it appears that my console is rendering these bytes separately, not as multi-byte sequences.

Ideas?

Last edited by mfoley; 09-18-2018 at 10:45 AM.
 
Old 09-18-2018, 12:22 PM   #2
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
OK, I figured it out! I have to remember that command line is not necessarily the same as console. I get to the command line via KDE konsole. When I thought to check the character encoding, I saw that it was set to ISO-8859-1. When I changed that to UTF-8, all characters started showing correctly on my screen!
 
  


Reply

Tags
codeset, mailx



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What locale/codeset do you run your slackware box on? GazL Slackware 77 08-10-2014 08:17 AM
Correct graphics display? JamesGT Linux - Newbie 17 12-04-2009 12:04 AM
correct DISPLAY setting mathfeel Linux - Software 2 05-26-2006 02:15 PM
Correct X11 display??? s1lv1a9999 Linux - Software 2 05-03-2004 01:39 AM
PC Display Not Correct Mal495 Linux - Newbie 1 10-30-2003 10:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration