[OT] Filenames with "special" characters (äöü€¶) on SMB share of Linkstation HD-HLAN250

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[OT] Filenames with "special" characters (äöü€¶) on SMB share of Linkstation HD-HLAN250

Alexander Skwar-11
Hello!

I've got a Buffalo Linkstation HD-HLAN250. This is a consumer
NAS device, which makes the built-in HD accessible via SMB
and FTP. On that system, some sort of Linux with some sort
of Samba is running.

I'm now trying to create filenames with special characters (ie.
non-ASCII chars) in it. For example "blöder name" (means
"stupid name").

To get access to the share on that NAS device, I added the
following line to my local /etc/fstab:

//HD/share      /HD/TEST        smbfs
noauto,credentials=/local/conf/hd-credentials,uid=guest,gid=users,fmask=0775,dmask=0775,workgroup=EUROPE,rw,lfs,iocharset=utf8,codepage=cp850 0 0

Now I created a file with name "blöder name" on it:

$ touch /HD/TEST/blöder\ name

That filename gets created just fine and Linux sees it just
fine:

$ ls -la /HD/TEST/bl*me
-rwxrwxr-x  1 guest users 0  6. Nov 10:46 /HD/TEST/blöder name

But when I use Windows XP to access the share, the filename is all
messed up - it's shown as "blöder name" instead. That's not
correct  :)

Also, when I create "blöder name" from Windows, only Windows sees
filename intact. Linux ls shows it as:

$ ls -la /HD/TEST/bl*win*
-rwxrwxr-x  1 guest users 0  6. Nov 10:48 /HD/TEST/bl?der windows name

Note the "?" after "bl" and before "der". That's not correct
either  :)

I also tried to mount that share using "cifs" as fs-type instead
of smbfs with the following line in /etc/fstab:

//HD/share      /HD/TEST2       cifs
noauto,credentials=/local/conf/hd-credentials,uid=guest,gid=users,file_mode=0775,dir_mode=0775,domain=EUROPE,rw,setuids,noperm,mapchars,soft,serverinoi,iocharset=utf8
0 0

But that's even worse... With this, not even Linux can see the
special characters fine:

$ touch /HD/TEST2/blöder\ cifs\ name
$ ls -la /HD/TEST2/bl*cifs*name
-rwxrwxr-x  1 guest users 0  6. Nov 10:51 /HD/TEST2/bl ?der cifs name

And in Windows, that name shows up as "bl Âder cifs name". That's
also not correct  :)

In the Basic Setup of the LS, I set ISO8859-15 as the character code.
I can only chose between some cp codepages (cp850, cp437, ...) and
iso8859-1, iso8859-15 and some other ISOs. cp850, iso-8859-1 and
iso-8859-15 are the only options relevant for me (ie. I don't care
about eg. japanese characters).

The HD-HLAN only offers SMB and FTP access; ie. no NFS  :(

How do I have to setup everything, so that I can use non-ASCII
characters from every OS and that they show up correctly
everywhere (ie. a "ö" has to be shown as "ö" everywhere and
not as "ö" or " Â")?

Thanks a lot,

Alexander Skwar
--
BOFH Excuse #334:

50% of the manual is in .pdf readme files
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: [OT] Filenames with "special" characters (äöü€¶) on SMB share of Linkstation HD-HLAN250

Holger Hoffstätte-2
On Sun, 06 Nov 2005 10:59:24 +0100, Alexander Skwar wrote:

> I've got a Buffalo Linkstation HD-HLAN250. This is a consumer NAS device,
> which makes the built-in HD accessible via SMB and FTP. On that system,
> some sort of Linux with some sort of Samba is running.
>
> I'm now trying to create filenames with special characters (ie. non-ASCII
> chars) in it. For example "blöder name" (means "stupid name").
> ...
> In the Basic Setup of the LS, I set ISO8859-15 as the character code. I

I have the following in my smb.conf:

  unix charset = ISO8859-15

and Umlauts work correctly either way (Linux <-> XP), but then again I
have a relatively new samba version (3.0.20). Samba has several different
charset and encoding options; if your storage device does not allow
changing arbitrary parameters you're most likely out of luck.

Holger


--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: [OT] Filenames with "special" characters (äöü€¶) on SMB share of Linkstation HD-HLAN250

Alexander Skwar-11
In reply to this post by Alexander Skwar-11
Hello!

Peter Ruskin schrieb:
> On Sunday 06 November 2005 09:59, Alexander Skwar wrote:
>> How do I have to setup everything, so that I can use non-ASCII
>> characters from every OS and that they show up correctly
>> everywhere (ie. a "ö" has to be shown as "ö" everywhere and
>> not as "ö" or " Â")?
>
> Try utf-8 instead of iso8859-15.

Where should I set this? You mean like this in fstab?

//HD/share      /HD/TEST        smbfs
noauto,credentials=/local/conf/hd-credentials,uid=guest,gid=users,fmask=0775,dmask=0775,workgroup=EUROPE,rw,lfs,iocharset=unicode,codepage=utf-8 0 0

Same error. I mounted /HD/TEST with those options, and "blöder
name" still shows up as "blöder name" on Windows.

Or like this?

//HD/share      /HD/TEST        smbfs
noauto,credentials=/local/conf/hd-credentials,uid=guest,gid=users,fmask=0775,dmask=0775,workgroup=EUROPE,rw,lfs,iocharset=iso8859-15,codepage=utf8 0 0

Still no go.

>  I default to utf-8 and had to set
> encoding to iso8859-15 in order to read your mail.

Sorry about the complications :(

Alexander Skwar
--
"Nature abhors a vacuum"
  -- Brian Behlendorf on OSS (Open Sources, 1999 O'Reilly and Associates)
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: Re: [OT] Filenames with "special" characters (äöü¤€¶) on SMB share of Linkstation HD-HLAN250

Alexander Skwar-11
In reply to this post by Holger Hoffstätte-2
Holger Hoffstaette schrieb:

> I have the following in my smb.conf:
>
>   unix charset = ISO8859-15
>
> and Umlauts work correctly either way (Linux <-> XP), but then again I
> have a relatively new samba version (3.0.20). Samba has several different
> charset and encoding options; if your storage device does not allow
> changing arbitrary parameters you're most likely out of luck.

Hm.

Thanks to OpenLink firmware from http://linkstationwiki.org/, I've
now got root access via ssh/telnet to the box. In the smb.conf
of the NAS device, I find:

    client code page = 850
    character set = ISO8859-15

It is running:

root@HD:~# /usr/sbin/smbd -V
Version 2.2.8a-ja-1.1

To what values should I change that?

Thanks again,

Alexander Skwar
--
s = (char*)(long)retval;                /* ouch */
             -- Larry Wall in doio.c from the perl source code
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: [OT] Filenames with "special" characters (äöü¤€¶) on SMB share of Linkstation HD-HLAN250

Holger Hoffstätte-2
On Sun, 06 Nov 2005 12:55:27 +0100, Alexander Skwar wrote:

> Holger Hoffstaette schrieb:
>
>> I have the following in my smb.conf:
>>
>>   unix charset = ISO8859-15
>>
>> and Umlauts work correctly either way (Linux <-> XP), but then again I
>
> Thanks to OpenLink firmware from http://linkstationwiki.org/, I've now got
> root access via ssh/telnet to the box. In the smb.conf of the NAS device,
> I find:
>
>     client code page = 850
>     character set = ISO8859-15

Hm..that does not look too wrong, although cp850 is right for Windows
only.

> It is running:
>
> root@HD:~# /usr/sbin/smbd -V
> Version 2.2.8a-ja-1.1
>
> To what values should I change that?

No idea. :( Encoding changed a bit in samba3 and I do not remember what I
did when I was still running samba2, although I remember I had it working
correctly - so it should be possible.
You could also try to set UNICODE in /etc/rc.conf to "no" and see if that
changes anything on the Gentoo client.

good luck
Holger


--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: [OT] Filenames with "special" characters (=?iso-8859-15?q?=E4=F6=FC=A4=B6?=) on SMB share of Linkstation HD-HLAN250

Christoph Eckert-2
In reply to this post by Alexander Skwar-11

bash-2.05b$ touch äöüÄÖÜß\ name
bash-2.05b$ ls -l äöüÄÖÜß\ name
-rw-r--r--  1 ce users 0  6. Nov 13:49 äöüÄÖÜß name

bash-2.05b$ locale
LANG=de_DE@euro
LC_CTYPE="de_DE@euro"
LC_NUMERIC="de_DE@euro"
LC_TIME="de_DE@euro"
LC_COLLATE="de_DE@euro"
LC_MONETARY="de_DE@euro"
LC_MESSAGES="de_DE@euro"
LC_PAPER="de_DE@euro"
LC_NAME="de_DE@euro"
LC_ADDRESS="de_DE@euro"
LC_TELEPHONE="de_DE@euro"
LC_MEASUREMENT="de_DE@euro"
LC_IDENTIFICATION="de_DE@euro"
LC_ALL=de_DE@euro


Gruß & best regards


    ce





--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: [OT] Filenames with "special" characters (äöü€¶) on SMB share of Linkstation HD-HLAN250

Alexander Skwar-11
Christoph Eckert schrieb:
> bash-2.05b$ touch äöüÄÖÜß\ name
> bash-2.05b$ ls -l äöüÄÖÜß\ name
> -rw-r--r--  1 ce users 0  6. Nov 13:49 äöüÄÖÜß name
>
> bash-2.05b$ locale
> LANG=de_DE@euro

Yes. No UTF-8. What do you get, when you do the same
with UTF-8 on a Samba share?

Alexander Skwar
--
A bird in the hand is worth two in the bush.
                -- Cervantes
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: [gentoo-user] [OT] Filenames with "special" characters (äöü€¶) on SMB share of Linkstation HD-HLAN250

Alexander Skwar-11
In reply to this post by Alexander Skwar-11
Peter Ruskin schrieb:

> ...but in konqueror the file is correctly displayed as "blöder name"

Yes. Seems like Konqueror doesn't care about system settings
and stores the filenames in non-UTF-8.

Anyway, I now managed to install NFS on the NAS box. With
NFS, I can now easily and successfully create filenames
with non-ASCII characters, like "blöder name". But
when I access the share from Windows (or rather: via
SMB), the filenames are still mangled :(

What I'm after is a way for Samba to transform filenames
from the stored (on disk) UTF-8 name to cp850 (or
whatever).

The NAS box is running Samba 2.2.8a.

Can Samba 2.2.8a do this? With Samba 3, this would be
possible, wouldn't it?

If Samba 2 could do this, how/what would I configure?
I suppose "client code page" and "character set" are
the relevant settings? What are the allowed values for
"character set"?

Are the "nftable" files in /usr/share/codepage the allowed
values? If so, then Samba 2 (or at least that installation)
doesn't handle UTF-8; only iso-8859-x and some cpX values.

Or would "find /lib/modules/$(uname -r) -name nls*.o" reveal
me the allowed values? If so, "UTF8" would be a good value -
but even with "character set = UTF8", I can't get a good
translation. "blöder name" translates to "bl├Âder name"
on Windows :(

Can Samba 2 do UTF-8 filename translation?

Thanks,

Alexander Skwar
--
[hidden email] mailing list