DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-06-24 11:01:02

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

problem with german characters mapping when mounting from linux

Hello everybody,

I have purchased a few days ago a DNS-323, and now I am playing with it. I am currently testing if German umlaute in filenames are correctly handled.

I have set the language to Western European. The DNS-323 smb.conf looks good:
[ global ]
client code page = 850
character set = ISO8859-1

From the Windows machine, eveything works ok. Umlaute are mapped correctly. However, I have trouble from my Linux server. The Umlaute öäü are shown as strange ? combination. I mount the samba share as follows:

# mount -t cifs -o username=antje%xxx,iocharset=iso8859-1 //<IP>/Volume_1/LaptopAntje /mnt/nas
# ls /mnt/nas/
  hmm ?.txt  ?h?.txt  PICT3303.JPG

For instance ?h?.txt should be ähö.txt

Can someone tell me what I am doing wrong?

TIA,
Loic.

Offline

 

#2 2007-06-24 13:02:15

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: problem with german characters mapping when mounting from linux

Which locale do you use in Linux?

UTF8?

Try

export LC_ALL=de_DE.ISO-8859-1

and then ls

Offline

 

#3 2007-06-24 14:50:07

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

frodo wrote:

Which locale do you use in Linux?

UTF8?

Good idea with  the locale! It seems to be set by default to: en_US.UTF-8

frodo wrote:

Try

export LC_ALL=de_DE.ISO-8859-1

and then ls

I tried it, unfortunately it didn't worked:
[loic@neumann ~]$ export LC_ALL=de_DE.ISO-8859-1
[loic@neumann ~]$ls /mnt/nas/
  hmm .txt  ?h?.txt  PICT3303.JPG
[loic@neumann ~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="de_DE.ISO-8859-1"
LC_NUMERIC="de_DE.ISO-8859-1"
LC_TIME="de_DE.ISO-8859-1"
LC_COLLATE="de_DE.ISO-8859-1"
LC_MONETARY="de_DE.ISO-8859-1"
LC_MESSAGES="de_DE.ISO-8859-1"
LC_PAPER="de_DE.ISO-8859-1"
LC_NAME="de_DE.ISO-8859-1"
LC_ADDRESS="de_DE.ISO-8859-1"
LC_TELEPHONE="de_DE.ISO-8859-1"
LC_MEASUREMENT="de_DE.ISO-8859-1"
LC_IDENTIFICATION="de_DE.ISO-8859-1"
LC_ALL=de_DE.ISO-8859-1

Even if I change LANG to de_DE.ISO-8859-1, still no luck so far.

Thanks,
Loic.

Offline

 

#4 2007-06-25 23:11:30

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

So, I did further investigations:

Code:

# ls -b /mnt/nas
\204h\224.txt  \ \ hmm\ \266.txt   PICT3303.JPG

I am puzzled, because:
\204 = 132, which correspond to 'ä' in Extended ASCII
\224 = 148, which corresponds to 'ö' in Extended ASCII.

Indeed, the file ähö.txt has been created from Windows. However, since ISO-8859-1 encoding is used, I would have rather expected for ähö.txt:
\344h\366.txt

So what's wrong? The /etc/smb.conf on my DNS-323 looks good:

Code:

# head -n 3 /etc/samba/smb.conf
[ global ]
client code page = 850
character set = ISO8859-1

I am lost... hmm

Other question: is it possible to turn (sys)log on, in order to see if SAMBA is starting correctly?

Cheers,
Loic.

Offline

 

#5 2007-06-25 23:33:33

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: problem with german characters mapping when mounting from linux

You can enable syslog if you setup the debian environment.

Have you used the EasySearch utility to set your locale on the DNS?

Which firmware level do you use?

Last edited by frodo (2007-06-25 23:34:12)

Offline

 

#6 2007-06-25 23:43:33

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

frodo wrote:

You can enable syslog if you setup the debian environment.

Have you used the EasySearch utility to set your locale on the DNS?

Which firmware level do you use?

I use FW 1.03.
I set the locale on the DNS with the Easy Search utility (3.5.0.0), [Language]. Western European was already selected, I clicked then on [OK] and the DNS has been rebooted.
Incidently, the extended ASCII happens to be codepage 850... I don't understand why the conversions are not carried out.

Cheers,
Loic.

Offline

 

#7 2007-06-25 23:55:40

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

Now, I've got the confirmation that the filename are stored using CP850:

Code:

# ls /mnt/nas | iconv -f CP850
essai_ÖÄ.txt
Für E-Mail
ähö.txt
PICT3303.JPG

Any ideas?

TIA,
Loic.

Offline

 

#8 2007-06-25 23:58:39

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: problem with german characters mapping when mounting from linux

Have you tried the codepage option? Google has a few examples you could try:

Code:

mount.cifs //192.168.1.3/Multimedia /var/nas/multimedia -o guest,iocharset=iso8859-1,codepage=cp850,dir_mode=0755,file_mode=0755,uid=1000,gid=0
codepage=850
codepage=cp850

Also check that your kernel actually supports cp850 and iso8859-1 (try modprobe cp850 or modprobe iso8859-1).

Offline

 

#9 2007-06-26 00:32:22

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

fonz wrote:

Have you tried the codepage option? Google has a few examples you could try:
Also check that your kernel actually supports cp850 and iso8859-1 (try modprobe cp850 or modprobe iso8859-1).

Yes. I have tried to mount with cp850:

Code:

# mount -t cifs -o iocharset=iso8859-1,codepage=cp850,user=antje%xxx //192.168.xx.xx/Volume_1/LaptopAntje /mnt/nas

# /sbin/lsmod | grep nls
nls_cp850               5185  0
nls_iso8859_1           4417  2
nls_utf8                2369  0

# ls /mnt/nas
essai_??.txt     PICT3303.JPG 
F?r E-Mail    ?h?.txt

I believe that the problem isn't really the mount option. But the fact that the name are stored using CP850 instead of ISO-8859-1.  The output are garbaged, because the terminal is expecting ISO-8859-1 encoding, not CP850.

As of my understanding, the global option "character set" and "client code page" in smb.conf should exactly define that mapping, and filenames should be stored on the disks using ISO-8859-1. 

Cheers,
Loic.

Offline

 

#10 2007-06-26 01:09:11

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

Hmm.. It seems that FW 1.03 is running Samba v2.2.8a:

Code:

# smbd -V
Version 2.2.8a

Googling on the net, I found the following:

When in the smb.conf (of Samba 2.x) there hasn't been set a correct ``character set'' variable, files which are created from Win* clients are being created in the client's codepage, e.g. cp850 for western european languages. As a result of that the files which contain non-ASCII characters are screwed up if you ``ls'' them on the Unix server. If you change the ``character set'' variable afterwards to iso8859-1, newly created files are okay, but the old files are still screwed up in the Windows encoding.

So, I am now really stucks... This should work, shouldn't it mad

Enough for today,
Loic.

Offline

 

#11 2007-06-27 10:54:56

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

I verified today what's really stored on the EXT2, by pulling one of the disk out, using an USB enclosure and mounting the drive from my Linux system.

I could clearly see that there the filenames are indeed stored using CP850 encoding. I raised a ticket with D-Link: 1138664.

In the meanwhile, did someone succeed in exchanging files with non english characters in the name between a Windows based and a Linux based system? Could someone verifies which encoding is used for the filename by reading directly one of the disk? That would be great! 

I am really disappointed. I must say, the DNS-323 could be a great piece of technology. I don't mind having to tinker in order to get it running. And I like the openness you can have with the fun_plug. 

But if I can't solve this problem, I am afraid that I will have to return the unit.

Thanks,
Loic.

Offline

 

#12 2007-06-27 11:41:01

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: problem with german characters mapping when mounting from linux

I had similar issues with firmware versions before 1.03. However after I updated to 1.03 and used EasySearch to set the locale and then recreated the volumes (Don't think this is needed but I was redoing the box anyway).

Now everything works greate. Locale is correct if I telnet to the box "åäö" looks correct.

Cheers

Offline

 

#13 2007-07-05 09:39:57

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

Re: problem with german characters mapping when mounting from linux

Hi everybody,

just to close this thread: it's seems that the forthcoming FW 1.04 is what I'm looking for, as UTF-8 encoding is used  for filenames. This will remove all the difficulties I was facing so far...

I'd like to note the excellent support offered by D-Link Germany on this story. I logged the issue through the Web Interface of their service portal. And I got fast, competant answers to my questions. I know that not everybody can share that experience with the D-Link  support, so I think it's worth mentioning.

Thanks everyone who helped!

Cheers,
Loïc.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB