LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't read greek filenames! (https://www.linuxquestions.org/questions/linux-software-2/cant-read-greek-filenames-243910/)

Braveheart1980 10-17-2004 05:19 PM

Can't read greek filenames!
 
I was using fedora core 2 and i was 100% satisfied. I was able to browse my partitions and read (and write) greek filenames. Yesterday i downloaded fedora core 3 test 3 (the dvd iso) and upgraded. After solving some problems eg nvidia driver installation etc) i have come up to a rather strange and unexpetcted problem: i can no longer read files stored with greek characters! My language is set to greek (i see greek menus , webpages etc 100% ok).
I can't remember what my fstab was but now is this :

"LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
#/dev/hda1 /home/george/mounted/WinXP ntfs ro,umask=0222
/dev/hda5 /home/george/mounted/GamesDVD vfat umask=0
/dev/hda7 /home/george/mounted/Essay vfat umask=0
/dev/hdb1 /home/george/mounted/MP3 vfat umask=0
/dev/hda6 /home/george/Games ext3 defaults
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0"

I have tried supplying the fstab parameters codepage and iocharset but none worked!
I've even reloaded all my fonts but it didn't work!

What should i do???

Braveheart1980 10-17-2004 05:52 PM

Any clue?

mary 10-17-2004 08:43 PM

Hmm.. I have had a ton of similar problems with Chinese filenames.

I think your locale changed, and now you can't see your old filenames. If I change my locale from zh_TW.Big5 to zh_TW.UTF8 (Chinese Traditional normal to Chinese Traditional Unicode) I can't see my old filenames anymore, even though I can still see webpages, etc.

Can you post the output of "locale" at the terminal?

BTW, were you using Greek language menus, etc before this problem, or were you using English/something else before?

Braveheart1980 10-18-2004 01:33 AM

I was using english menus but i had greek filename support!
I am @ work now so i'll post later my locale output.

BTW How did your un-regocnised characters appearead? Mine look like this "????? ?? ????"

mary 10-18-2004 11:09 AM

I did some google searching, seems as if "el_GR" is the code for Greek - I didn't know this. And there is an "el_GR.utf8" for Unicode.
From what I can tell, before, your computer was set maybe to "en_US.utf8" (Fedora's default, IIRC) and now it is set to "el_GR.iso88597" (Greek encoding). But that is just a guess.

Before, though, you must have had LC_CTYPE set to Greek if you were able to input Greek. See, you can set different language options seperately, such as be able to input Greek but still have your menus in English. Or have your time and date set for one country, and your menus for another. That's what I have: My menus, dates, etc in English but the ability to input Traditional Chinese.

See, I don't know if you change it from "en_US.utf8" to "el_GR.utf8" if it does this to the filenames or not.

So if your "locale" output says anything other that "el_GR.utf8" try this: (I am sorry if you know how to work vim, but I'm assuming you don't so I don't leave you stuck!)

Code:

vim .bash_profile
Then, hit the "i" key to enter insert mode in Vim

And type:

Code:

export LANG="el_GR.utf8"
hit the escape key and then ":wq" (colon before the wq) and enter to quit.

Now reboot, since you are (probably) running GDM and I think the easiest way to register this is just to reboot.

I am not sure if Fedora will register this or not. For me, on Gentoo, starting X from the CLI, it does.. so to check, post the output of "locale" again, see if it's changed.

If it is, great! I think it would show your filenames then.. but I am not sure. Let me know OK?

One more question: can you make new filenames with Greek? Do they show up OK? Is it just the old ones you can't read?

Oh, and my characters in KDE show up as nonsense Chinese characters with spaces and the like. But I think in Gnome they might have shown up as ????? too.. Can't remember. Gnome seems to be more forgiving with the characters, right now some nonsense ones in KDE show up fine in Gnome!

Braveheart1980 10-18-2004 04:55 PM

First of all my locale output is here
"
[george@localhost ~]$ locale
LANG=el_GR.UTF-8
LC_CTYPE="el_GR.UTF-8"
LC_NUMERIC="el_GR.UTF-8"
LC_TIME="el_GR.UTF-8"
LC_COLLATE="el_GR.UTF-8"
LC_MONETARY="el_GR.UTF-8"
LC_MESSAGES="el_GR.UTF-8"
LC_PAPER="el_GR.UTF-8"
LC_NAME="el_GR.UTF-8"
LC_ADDRESS="el_GR.UTF-8"
LC_TELEPHONE="el_GR.UTF-8"
LC_MEASUREMENT="el_GR.UTF-8"
LC_IDENTIFICATION="el_GR.UTF-8"
LC_ALL=
[george@localhost ~]$
"

Braveheart1980 10-18-2004 04:58 PM

LANG seems pretty right!I don't get it!I'll edit my .bash-profile though and post results

Braveheart1980 10-18-2004 05:07 PM

I've rebooted and unfortunatelly it didn't work!!! I even tried to mount my hard drive like this is fstab "/dev/hdb1 /home/george/mounted/MP3 vfat auto,utf8,umask=0" but with no luck!!

Braveheart1980 10-18-2004 05:40 PM

I have made an image of my system with norton ghost when i had fedora core 2 and i have restored it. It is pretty strange cause my locale output is the same
"
[george@localhost george]$ locale
LANG=el_GR.UTF-8
LC_CTYPE="el_GR.UTF-8"
LC_NUMERIC="el_GR.UTF-8"
LC_TIME="el_GR.UTF-8"
LC_COLLATE="el_GR.UTF-8"
LC_MONETARY="el_GR.UTF-8"
LC_MESSAGES="el_GR.UTF-8"
LC_PAPER="el_GR.UTF-8"
LC_NAME="el_GR.UTF-8"
LC_ADDRESS="el_GR.UTF-8"
LC_TELEPHONE="el_GR.UTF-8"
LC_MEASUREMENT="el_GR.UTF-8"
LC_IDENTIFICATION="el_GR.UTF-8"
LC_ALL=
[george@localhost george]$
"
my fstab is also the same : "
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/hda1 /home/george/mounted/WinXP ntfs ro,umask=0222
/dev/hda5 /home/george/mounted/GamesDVD vfat umask=0
/dev/hda7 /home/george/mounted/Essay vfat umask=0
/dev/hdb1 /home/george/mounted/MP3 vfat umask=0
/dev/hda6 /home/george/Games ext3 defaults
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
"
but now I HAVE GREEK READABLE FILENAMES !! So the change from fc2 to fc3t3 which corrupted my readable greek characters is somewhere else!

Any ideas where to look????

mary 10-18-2004 07:06 PM

So strange, especially since you were going around with English menus with everything set to el_GR.utf8?!

Then again, if you were using kde it wouldn't have changed. KDE doesn't go by those settings except for input. Gnome, however, reads the locale and sets the language accordingly. What desktop are you using? KDE gives me more problems with filenames, as I said.

Getting languages to work under Linux (or even Windows, for that matter) can drive one insane. I still have barely acceptable Chinese support working. Haven't had the patience to deal with it. At least I can help others with language problems (a little) now. :)

I really don't know what to say. Try changing it to el_GR.iso88597 and see what happens. Just a guess though, it might make matters worse.

Can you create Greek files and read them OK, or is it just your old ones?
I only have a few Chinese files so it's easy for me to rename them, but I assume you have a lot of Greek files and it would be a pain for you to rename them all (assuming you can create new files alright)

If you can't create new files okay, then I'm REALLY clueless.

Braveheart1980 10-19-2004 05:18 PM

Any ideas?
Could this be a bug i should report?

Braveheart1980 10-20-2004 04:21 PM

Anyone?

Braveheart1980 10-23-2004 04:07 AM

I've opened up a bug in bugzilla. Bug # 136564 that is.

Here is also my /etc/sysconfig/i18n

LANG="el_GR.UTF-8"
SUPPORTED="en_US.UTF-8:en_US:en:el_GR.UTF-8:el_GR:el"
SYSFONT="latarcyrheb-sun16"

Any ideas?

Braveheart1980 10-23-2004 07:31 PM

Anyone?

BaltikaTroika 10-23-2004 09:19 PM

I've been through this a bunch of times trying to read Russian filenames (on both my Windows and Linux partitions). From what I can tell, you can quite easily read websites/text in any language. All that takes is making sure you add support for that language when you install (or afterwards - although this is harder, from what I understand - although WinXP/2000 lets you do it from the control panel).

When I install Mandrake, during initial language (locale) selection, I must change the language from American English to Russian. Then I must click "Advanced" at the bottom of the screen to get additional languages. Here, I can pick American English as a secondary language. If you do this the other way around, your OS will NOT read Cyrillic filenames! The main language that you pick determines the language used for filenames and folders - such things on the system level. In the Windows world, this is called the "System Code Page"... with Linux, I'm not sure. It's pretty dangerous to fool around with this after the install (if the warnings on the Russification websites are to be believed).

Anyway, I have a feeling that this didn't help you a bit... but it might help out somebody else who is wondering why they see ????????.??? for all of their filenames. :) I never knew that the Locale selection was so important, but it really is! I was always confused and couldn't understand why I could read Russian websites with no problem, but couldn't read my Russian filenames.

BaltikaTroika


All times are GMT -5. The time now is 01:02 AM.