[Samba] Problems with odd characters in filenames on smbmounted Win95 share

Keith G. Murphy keithmur at mindspring.com
Wed Jul 3 09:55:07 GMT 2002

Urban Widmark wrote:

> On Tue, 2 Jul 2002, Keith G. Murphy wrote:
>>I think that the characters are getting translated on the Win95 side 
>>into Codepage 437 (or something similar), replacing the "out-of-band" 
>>characters with underscores, because a Win98 machine looking at the same 
>>share sees exactly the same thing and has exactly the same problems as 
>>smbfs and smbmount on Linux.  That is further supported by the fact that 
>>underscores are used, because I think the Samba code uses something else 
>>(question marks?).
> smbfs used to map things into questionmarks.
> Note that smbfs doesn't care one bit about your smb.conf. You either set
> it to a default when building the kernel or you pass it as a mount option
> (iocharset/codepage). See the smbmount manpage.
>>>I'd also love to know how you can tell which codepage the Windows server 
>>>is actually using, if that question makes sense.
>>I'd still like to know this.  And even how to change it, if possible...
> If it's win9x I *think* it follows what you set in dos. I have the
> following in my autoexec.bat.
> mode con codepage prepare=((850) D:\WINDOWS\COMMAND\ega.cpi)
> mode con codepage select=850
> keyb sv,,D:\WINDOWS\COMMAND\keyboard.sys
> But maybe there is some other win9x setting for this ... an I have no 
> intention of playing with this to see if it changes anything.
> I don't know how to detect it (remotely) though. That would be nice to do.
Thanks, Urban; that's actually a useful comment, since it tells me that smbfs probably

doesn't do any detection now.

What I can see so far, using Ethereal (God, it's great), is that in the 
SMB header, in the Flags2 field, there is a bit unset that is supposed 
to mean:

Unicode Strings: Strings are ASCII

That's interesting, but I don't know if I'm on the wrong track.

I also don't know:

* What smbfs code does/would deal with this flag
* How to change it on the Windows side

One thing's for sure: if I get to the bottom of this, and figure out how 
  to code some detection in smbfs, I'll gladly contribute the code.  :-)

More information about the samba mailing list