smbclient, unicode, and winnt
Frank Giessler
giessler at biomag.uni-jena.de
Fri Jul 20 11:17:01 GMT 2001
Hi all,
I haven't subscribed this list though I thought you might be interested.
This might have been addressed before but I couldn't find a solution.
I'm trying to backup our NT4 and Win2k workstations with smbclient (2.2.1a
running on Solaris 2.6):
smbclient //server/C$ -U administrator -W server -Tc tar.out
but all files and directories containing international characters (and
only those) produce an error, e.g.:
ERRDOS - ERRbadfile (File not found.) listing
\winnt\profiles\giessler\Startmenü\*
I tried with different settings for 'valid chars', 'character set', and
'client code page' in smb.conf but without success. There is no problem
when accessing Win9x machines. I should note that it works flawlessly the
other way round (i.e. accessing such files on a samba server from an NT
workstation), so I think it might be a problem with smbclient.
After experimenting a bit I found that the following modification to
dos_PutUniCode() makes it work:
*** util_unistr.c.sav Fri Jul 6 04:01:36 2001 ---
util_unistr.c Fri Jul 20 09:28:28 2001 ***************
*** 68,74 ****
if (skip == 2)
val = ((val << 8) | (src[1] & 0xff));
!
SSVAL(dst,ret,doscp_to_ucs2[val]);
ret += 2;
len -= 2;
if (skip) --- 68,74
----
if (skip == 2)
val = ((val << 8) | (src[1] & 0xff));
!
SSVAL(dst,ret,unixcp_to_ucs2[val]);
ret += 2;
len -= 2;
if (skip)
***************
I'm aware that this could break other things. But maybe it's worth to look
at it.
Cheers, Frank
__
Frank Giessler
Klinikum der Universitaet Jena Tel.: +49-3641-9 35259
Biomagnetisches Zentrum Fax : +49-3641-9 35355
More information about the samba-technical
mailing list