Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using Konsole for a terminal session. It has "Default character encoding" set to UTF-8. In the session, $LANG=en_US.UTF-8. Yet when I cat a file with UTF-8 characters I get the question-mark inside an inverse diamond. Why don't I see the UTF-8 character? I have the Konsole font set to DejaVu Sans Mono 13pt.
I use xdce4-terminal but I too set it to DejaVu Sans Mono. A quick check shows that it can cat a file with runes in it, even though that font doesn't include runes.
The problem could be either specific to Konsole or it could be a wider KDE problem — not seeking an alternative font when the default is unsuitable. I can't solve either problem, but I can suggest an alternative terminal: mlterm is specifically designed to cope with any language. Of course that may not help if it's a KDE problem.
DavidMcCann: Thanks. I just tried mlterm. As installed, it didn't work either to show UTF-8 characters with 'cat'. I didn't see any way to change settings in mlterm, such as BG/FG colors, font or charset. Is there a way to do that? Maybe I need to config a charset setting or something.
Ah ha! Problem solved. Being new to the bewildering world of UTF-8 notation I had the wrong Hex bytes. My file had 00 B0, which is the "Hex Code Point" which, I suppose is represented as U+00B0. But that's not the Hex byte values. Those are C2 B0. When I changed the file to have C2 B0, then Konsole displayed the UTF-8 character correctly (degree symbol). The browser, however, display the degree symbol correctly whether or not the Hex characters were 00 B0 or C2 B0.
I'm sure there are all kinds of good reason for representing the hex sequence C2 B0 as U+00B0, but it confused me for a while.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.