LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-05-2013, 05:11 PM   #1
funkyslacker
LQ Newbie
 
Registered: Sep 2012
Location: Germany
Distribution: Slackware64-14.0, Slackware-current, Slackware ARM
Posts: 15

Rep: Reputation: Disabled
Encoding Problems UTF-8 or ISO-blahblah


Hi,

I have some trouble with the encoding. I use UTF-8 most of the time, but sometimes I have encoding problems in X and command-line or other OS.

I'm from Germany and I want/need the special chars like ń, ÷, Ř, etc.
But when I rename a file e.g. "÷ffentlich.doc" (engl. public.doc) my command line can't encode the char "÷" correct.

Can anyone explain the encoding scheme in linux and what's the best encoding for me and why my X and command-line uses different encoding schemes?
 
Old 08-07-2013, 06:08 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,808
Blog Entries: 58

Rep: Reputation: Disabled
These two articles might help:

http://duganchen.ca/writings/slackware/fonts/

http://slackwiki.com/Utf-8_linux_console
 
Old 08-14-2013, 06:27 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,353

Rep: Reputation: Disabled
Quote:
Originally Posted by funkyslacker View Post
Hi,

I have some trouble with the encoding. I use UTF-8 most of the time, but sometimes I have encoding problems in X and command-line or other OS.

I'm from Germany and I want/need the special chars like ń, ÷, Ř, etc.
But when I rename a file e.g. "÷ffentlich.doc" (engl. public.doc) my command line can't encode the char "÷" correct.

Can anyone explain the encoding scheme in linux and what's the best encoding for me and why my X and command-line uses different encoding schemes?
When you say 'command-line' do you mean outside of X? Or in an xterm-like terminal inside X?

For the former, my UTF Linux Console page that BrianL linked should be useful.

If you mean in an xterm then you still need you LANG setup for utf-8 (check the locale command and look in /etc/profile.d/lang.sh). You also need a suitable font that contains the correct character set. Usually you can't go wrong with Deja Vu Sans Mono, Liberation Mono or Droid Sans Mono (Droid is on slackbuilds.org). And of course you need to use a UTF-8 capable terminal. Default in Slack are 'Terminal' (part of xfce), 'Konsole' (kde) and 'xterm -u8'. I tend to use urxvt (rxvt-unicode on slackbuilds.org) as it is much more configurable than xterm and lighter than Terminal or Konsole. There are also others around.

You may also set alt-gr to be the 'compose' key (X knows it as the Multi_Key) in ~/.Xmodmap:

keycode 108 = Multi_key Multi_key

Where 108 is the keycode found with xev. Then 'xmodmap ~/.Xmodmap' to apply the settings, or restart X.

Then accented characters can be typed using alt-gr. To make a '÷' do alt-gr " o

I hope the above is useful.
 
Old 08-17-2013, 06:31 AM   #4
funkyslacker
LQ Newbie
 
Registered: Sep 2012
Location: Germany
Distribution: Slackware64-14.0, Slackware-current, Slackware ARM
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi,

sorry for the late answer and thank you very much. Now I understand the encoding and keymapping much better. I think the problem in my case is the configuration of X. I'll take a look in the next days and try to solve the problem. But your answers and links helped a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to set permanent UTF-8 encoding in xterm simopal6 Linux - Software 6 01-13-2013 05:24 AM
Converting UTF-16 files to another encoding (such as UTF-8) crisostomo_enrico Solaris / OpenSolaris 3 03-25-2008 06:30 PM
Change Encoding from UTF-8 to CP1256 AGazzaz Linux - Newbie 4 12-21-2007 05:58 PM
im getting UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1' jabka Linux - Newbie 2 11-24-2006 06:44 AM
determine encoding type of a file (ie - UTF-8) chovy Linux - Software 1 04-03-2006 01:46 AM

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

All times are GMT -5. The time now is 01:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration