LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-22-2014, 07:01 PM   #1
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Rep: Reputation: 39
greek filename found in a vfat microSD card appear as question marks


Hello everyone,
this is one of those things that you think you have got completely over yet once in a while something just does not work as you expect it.

So I have an old microSD card (vfat filesystem) from my android phone and I wanted to migrate the data to a larger microSD card. Note that connecting the card to an ubuntu system shows correctly all the filenames - english and greek alike, in CLI.

Now inserting the same microSD card in my slackware system will show (in CLI always) the greek characters in filenames replaced with question marks. No the slackware system is a headless server, so I ssh into it.

Also, I have not altered the /etc/profile.d/lang.sh or ~/.profile files and unless you state otherwise I would prefer to keep it that way(they are default "en_US"). so for the bash session I
Code:
export LANG=el_GR.UTF-8
the filename still has question marks:
Quote:
-rwxr-xr-x 1 root root 3650929 Feb 8 2014 ????????\ -\ 25\ ?????\ (??????\ ?????????\ ?????)-zeL39hntE74.mp3*
no fear, I thought the font is not correct so I loaded many greek fonts in turn from , which unfortunately did not solve the problem even though the fonts loaded up fine. for example:
Quote:
setfont -v gr737a-8x8.psfu.gz
Loading 256-char 8x8 font from file /usr/share/kbd/consolefonts/gr737a-8x8.psfu.gz
Loading Unicode mapping table...
I checked that unicode is enabled with "kbd_mode"
Quote:
root@stargaze:~# kbd_mode
The keyboard is in Unicode (UTF-8) mode
(note: by choosing el_GR.UTF-8 and redoing this test I will successfully see the above message translated in greek, but the filenames will still appear as question marks)

Also, "stty -a" has the -iutf8 flag (as the slack docs suggest to check).

I have read alot of related information on the internet including:
http://docs.slackware.com/slackware:localization
http://www.linuxquestions.org/questi...nguage-713154/
http://members.hellug.gr/djart/artic...x/grlinux.html
several greek sites

I honestly do not know what else to try to show these characters correctly from ssh session. Note that all the above where run as root so there should not be any permission issues. What am I missing here?

thank you in advance for your help!
 
Old 11-22-2014, 07:24 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Wonder if something else is going on and not just name issue.

So from linux it works correctly??

Just copy off data then and move over may be that way and seem if new drive also acts the same?

Last edited by jefro; 11-22-2014 at 07:26 PM.
 
Old 11-22-2014, 08:39 PM   #3
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
Quote:
So from linux it works correctly??
Not sure what you mean.


Copying the data and seeing everything on a more unix oriented partition did not solve the problem. still question marks...
 
Old 11-22-2014, 09:10 PM   #4
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Another area to investigate may be how the card is mounted. Perhaps something funny is going on with how the card is mounted as a filesystem.
 
Old 11-22-2014, 11:19 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
The first question is: is it a legacy OEM encoding (1 byte per character) or a multi-byte one (Unicode, UTF-8 or UTF-16). This page says the former for FAT12, FAT16, and FAT32 , but the man page for convmv says that internally FAT16 is used. A way to check would be to check the number of bytes used to display the filename.

Anyhow see convmv.

Last edited by Didier Spaier; 11-23-2014 at 04:38 AM.
 
Old 11-23-2014, 02:37 AM   #6
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
Maybe ssh to the box from an uXterm
to be sure the terminal works with Unicode Characters.

And also try to mount the SD card with the option iocharset=utf8

Enjoy
 
1 members found this post helpful.
Old 11-23-2014, 03:16 PM   #7
rouvas
Member
 
Registered: Aug 2006
Location: Greece
Distribution: Slackware.12.2
Posts: 104
Blog Entries: 3

Rep: Reputation: 21
Mount the SD card using a UTF-8 encoding as mounting options.
Since the card originated from an Android device, the filenames were originally written using this encoding.
Failing that, try mounting the card using the ISO-8859-7 encoding.
No reason to mess with fonts or terminal settings.
 
Old 11-24-2014, 03:01 AM   #8
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Rep: Reputation: 73
from my notes:

Mount fat32 external hdd with utf8 ( for correct display russian and so on filenames) in linux ( in default mount with ancient western codepage !!!):

mount -t vfat -o defaults,utf8 /dev/sdd1 /mnt/tmp
 
1 members found this post helpful.
Old 11-25-2014, 02:10 PM   #9
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Rep: Reputation: Disabled
lilo.conf

Did you try to enable utf8 in lilo.conf:

append="vt.default_utf8=1"

http://www.slackwiki.com/Utf-8_linux_console
 
Old 11-26-2014, 02:05 AM   #10
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Rep: Reputation: 73
Quote:
Originally Posted by ppencho View Post
Did you try to enable utf8 in lilo.conf:

append="vt.default_utf8=1"

http://www.slackwiki.com/Utf-8_linux_console
that seems to be vfat mounting problem - i defoult, "mount" command mount it with something ancient codepage, who causes all that problems.
Wondering, why novadays "mount" command not mount all media with utf8 cp?

may be good to make in slackdocs small "howto" about vfat and utf8 mount ? Anyone want to do this?
 
Old 11-26-2014, 02:34 AM   #11
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Ls itself doesn't display 8 bit characters in filenames until told so by setting LC_CTYPE and maybe using the option "-N". Look up locale(7) in the manual pages.

Quote:
Originally Posted by Didier Spaier View Post
The first question is: is it a legacy OEM encoding (1 byte per character) or a multi-byte one (Unicode, UTF-8 or UTF-16).
FAT itself (the on-disk format) doesn't support UTF-8 nor UTF-16. It only supports the preceding UCS-2 (used by Windows 95) for "long" filenames and IBM-DOS codepages for short filesnames.
 
1 members found this post helpful.
  


Reply

Tags
cli, greek fonts, slackware



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
[SOLVED] MicroSD Memory Card Recovery NotAComputerGuy Linux - Newbie 7 06-30-2014 08:44 PM
PengPod boot microSD card djheadley Linux - Software 1 04-15-2014 03:27 PM
Label of MicroSD memory card alfredo10 Linux - Hardware 2 07-02-2012 10:32 AM
Repair Corrupted microSD Card hkothari Linux - Hardware 5 06-14-2010 12:18 PM
Anyone with fedora core 3 have greek filename support?? Braveheart1980 Fedora 0 11-10-2004 11:48 PM

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

All times are GMT -5. The time now is 08:13 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