Ian! D. Allen [NCFreeNet]
2002-Sep-02 13:41 UTC
[Samba] incomplete smbmount smbfs Win98SE iso8859-1 translation in kernel 2.4.18
I'm getting only partial iso8859-1 translation from an smbfs mount from my Win98SE machine. The smbfs mounted file system shows most lower-case accented characters fine; but, it substitutes underscores for most of the upper-case accented characters (and a few lower-case ones too): # uname -a Linux elm 2.4.18-8.1mdkian3 #7 Sat Aug 17 15:19:44 EDT 2002 i686 unknown (Mandrake 8.2 Linux with all Mandrake updates [including kernel] applied.) # mount -r -t smbfs -o iocharset=iso8859-1,codepage=cp850 //win/D /mnt/d # cat /proc/mounts | grep /mnt/d //win/D /mnt/d smbfs //ro,win95,file_mode=0755,dir_mode=0755,codepage=cp850 0 0 # lsmod | grep nls nls_cp850 3584 1 (autoclean) nls_iso8859-1 2816 1 (autoclean) # echo /mnt/d/test* /mnt/d/testç_éÉâêîôû_____àèìòù_____.url # echo /mnt/d/test* | od -tx1c | sed -e '/^0/s/ / /g' 0000000 2f 6d 6e 74 2f 64 2f 74 65 73 74 e7 5f e9 c9 e2 / m n t / d / t e s t ç _ é É â 0000020 ea ee f4 fb 5f 5f 5f 5f 5f e0 e8 ec f2 f9 5f 5f ê î ô û _ _ _ _ _ à è ì ò ù _ _ 0000040 5f 5f 5f 2e 75 72 6c 0a _ _ _ . u r l \n The first underscore (between c cedilla and e acute accent) is supposed to be ã (small a with tilde). The next two sets of five underscores correspond to upper-case accented vowels, first with circumflexes and second with grave accents. Naturally, I can't access any of the files that have had underscores substituted; because, when Unix sends the file name with underscores back to Win98SE it has no file by that name. Why am I getting only partial translation to latin-1? Pointers to more man pages graciously accepted... # rpm -q samba samba-2.2.3a-10mdk -- -IAN! Ian! D. Allen Ottawa, Ontario, Canada idallen@ncf.ca Home Page on the Ottawa FreeNet: http://www.ncf.ca/~aa610/ College professor at: http://www.algonquincollege.com/~alleni/ Board Member, TeleCommunities CANADA http://www.tc.ca/
Urban Widmark
2002-Sep-02 18:12 UTC
[Samba] incomplete smbmount smbfs Win98SE iso8859-1 translation in kernel 2.4.18
On Mon, 2 Sep 2002, Ian! D. Allen [NCFreeNet] wrote:> # cat /proc/mounts | grep /mnt/d > //win/D /mnt/d smbfs //ro,win95,file_mode=0755,dir_mode=0755,codepage=cp850 0 0^^ What is that? Since it doesn't print the iocharset I assume your CONFIG_NLS_DEFAULT is set to the same. So that's ok.> # lsmod | grep nls > nls_cp850 3584 1 (autoclean) > nls_iso8859-1 2816 1 (autoclean)If you umount and unload the smbfs module, these both go to 0?> Why am I getting only partial translation to latin-1? > Pointers to more man pages graciously accepted...One reason could be that the server isn't actually using codepage 850 but something else that partially overlaps (437 ?). You could try some different settings here. To find out what the server is sending you could sniff it using ethereal and see if it makes sense. Also look at the nls tables in the kernel source tree (fs/nls) and see if the charset(850) -> unicode -> charset(iso8859-1) values match. You could also try the unicode patches from this page: http://www.hojdpunkten.ac.se/054/samba/index.html (Note the order and the samba patch+option needed) /Urban