LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-20-2009, 12:09 PM   #1
simeon.mattes
Member
 
Registered: Feb 2009
Posts: 60

Rep: Reputation: 15
console and greek language


Hi,

I have a problem with the my files, which use greek letters. I can't see them.

Is there anything I can do?

Thanks in advance
 
Old 03-20-2009, 12:24 PM   #2
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
Hello,

It'd be useful if you posted a little more information, such as which version of Slackware you're on (I'm assuming 12.2) and if it's in console or X you're having problems, and which desktop you're on (I'm assuming you're in X using KDE).

Despite the assumptions the first piece of advise is pretty general.

You need to set a UTF-8 locale in order to get unicode and thus show the special greek characters. Here's what I've done in my .bashrc/.profile:
Code:
export LANG=el_GR.UTF-8                 # Set Greek UTF-8 Unicode locale
export LC_MESSAGES=en_US.UTF-8          # Set English language messages
export LC_TIME=en_GB.UTF-8              # Set British day/time names
export G_FILENAME_ENCODING=UTF-8        # Set locale for Flash player
The easiest way is just to set
Code:
LANG=el_GR.UTF-8
This will give you UTF-8 settings and greek error messages in console applications.

However, since I'm not a big fan of translated system messages, I've gone with the solution listed on top, to control the format a bit more.

If you're having trouble in the KDE programs such as file manager etc, make sure you have set the right unicode there as well.

And if none of that works, report back with more details, and we'll see what we can do :-)
 
Old 03-20-2009, 12:24 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Hello Simeon, welcome to LQ.

What you could do is give us more information so we can help you.

What are your distribution and version ?
What is the encoding of you file (if you know it) ?
With which application do you try to read it ?
 
Old 03-20-2009, 08:17 PM   #4
simeon.mattes
Member
 
Registered: Feb 2009
Posts: 60

Original Poster
Rep: Reputation: 15
Hi,

thanks all for your reply and sorry for not being so clear.

I'm using slackware 12.2 without X. Only in CLI. Though I have the same problem With X (KDE).

All command-line applications such as vi,vim,emacs can't read greek characters. Actually I don't care about the content but only for the files and directories. For instance if a have a directory with files named with greek letters, and I type ls or ls -a, it seems that the directory is empty.

Actually I don't know the encoding. It's the default encoding that windows have for the greek language. I don't know if it plays a role but the format of the disk that I 'm trying to read the files is NTFS.

Yalla-One, could you give me the full path of the file I have to change, because I can't find it.
 
Old 03-21-2009, 12:19 AM   #5
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
Quote:
Originally Posted by simeon.mattes View Post
Yalla-One, could you give me the full path of the file I have to change, because I can't find it.
Slackware defaults to ISO, so by setting UTF-8 as I suggested you're most likely to have your problem solved.

You can either do it in $HOME/.profile (if you haven't already customized your home directory, chances are you'll have to create this file) or you can do it in
Code:
/etc/profile.d/lang.sh
In that file you see a number of commented out "export LANG=" statements, with one saying "export LANG=en_us". Comment out that one, and replace it with either "export LANG=en_us.utf-8" or with the ones I suggested in the first post.

Easiest way though is to just append the lines I suggested to your $HOME/.profile by typing
Code:
echo "LANG=el_GR.UTF-8" >> $HOME/.profile
If you don't want greek messages, just type
Code:
echo "LANG=en_US.UTF-8" >> $HOME/.profile
instead...

Good luck!
 
Old 03-21-2009, 03:39 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi

You can find a nice howto about greek in linux, either in X and in CLI, here. It's written in greek though.

Regards
 
Old 03-21-2009, 03:49 AM   #7
simeon.mattes
Member
 
Registered: Feb 2009
Posts: 60

Original Poster
Rep: Reputation: 15
Really thanks for your reply. I'll try it and I'll inform you.

Bathory don't worry about the link you gave me. It think I can manage it since Greek is my native language. Give my respects to Piraeus.


Thanks again
 
Old 03-21-2009, 04:27 PM   #8
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by simeon.mattes View Post
Hi,

I have a problem with the my files, which use greek letters. I can't see them.

Is there anything I can do?

Thanks in advance
The hellug howto is a bit old and most of the stuff mentioned there aren't needed.

In order to be able to type greek letters on the keyboard and read greek letters on the screen
the mininum you need is LC_CTYPE to be set. If you want a full greek enviroment so that even
commands return greek errors and messages you set LANG which will set everything.

As Yalla-One mentioned you can change the settings in /etc/profile.d/lang.sh (for sh like shells)
and /etc/profile.d/lang.csh (for csh like shells)

Use your favourite editor (eg vi, nano etc) to edit /etc/profile.d/lang.sh (assuming you are using
bash which is the most common).

Change the variable LANG to say "export LANG=el_GR.UTF-8". In the end of the file there is also
a line mentioning LC_COLLATE=C. This changes the sort order and has the effect that greek names
don't get sorted correctly. So disable this line by putting a hash # in the beginning of it

This tells the system to use a Greek locale. In order to actually see greek letters in console
you need to use a greek font and in order to type greek you need to use a greek keymap.
The scripts setting the font and the keymap are /etc/rc.d/rc.font and /etc/rc.d/rc.keymap respectively.
Choose the "gr.map" keymap and the "iso07u-16.psfu.gz" font.

In order to set the font instead of directly editing the script you can also run setconsolefont.

I include what my scripts look like in case it helps you.

/etc/rc.d/rc.font

Code:
setfont -v iso07u-16.psfu.gz
/etc/rc.d/rc.keymap
Code:
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys -u gr.map
fi
/etc/profile.d/lang.sh
Code:
export LANG=el_GR.UTF-8

# export LC_COLLATE=C
SPOILER tags didn't work so i removed all the comments (lines beginning with #) in order to
make the post smaller.

I hope i helped you.

Last edited by imitheos; 03-21-2009 at 04:43 PM.
 
Old 04-14-2009, 08:06 AM   #9
simeon.mattes
Member
 
Registered: Feb 2009
Posts: 60

Original Poster
Rep: Reputation: 15
Thanks imitheos for your help but unfortunately it didn't work.


Quote:
Originally Posted by imitheos View Post

/etc/rc.d/rc.font

Code:
setfont -v iso07u-16.psfu.gz

Actually there wasn't such a file. The only file I found in r.d directory was rc.font.new. So I created a new rc.font


Quote:
Originally Posted by imitheos View Post
/etc/rc.d/rc.keymap
Code:
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys -u gr.map
fi

I also din't find rc.keymap. So I also created.

Is there any problem with the fonts that windows use? The files I was telling you have been created through windows and are in an NTFS or Fat32 format hard disk

Last edited by simeon.mattes; 04-14-2009 at 08:07 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Greek???HELP please archer Slackware 4 04-19-2008 01:43 PM
Greek Characters in Console foucault Linux - General 3 07-02-2006 04:36 PM
Translation to Greek language... tompravi LQ Suggestions & Feedback 2 05-12-2005 09:21 PM
How do I provide Greek Language support on FC3 Box? evalastin Linux - Newbie 0 01-11-2005 11:09 AM
What do you think about Greek? LinuxSeeker General 28 03-24-2004 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:12 PM.

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