The Samba-Bugzilla – Bug 4058
same unix charset can be sometimes valid, sometimes invalid
Last modified: 2006-10-05 06:34:03 UTC
when "unix charset = iso8859-1" is set, files are correctly being listed for latin1 encoded files but copying files is not possible, smbd logs says
log.smbd: init_iconv: Conversion from iso8859-1 to ASCII not supported
So iso8859-1 is a valid writing for some samba parts but it's an invalid writing for other parts of samba. If you use "iso-8859-1" (dash after iso) then things work well, listing and file transfers.
Tested with SLES10.
Can't provide more detailed logs right now, sorry. Can reproduce this later on with more contextual logs...
Created attachment 2177 [details]
level 10 log
this is a level 10 log from smbd startup till that error occurs.
Samba configured with unix charset = iso8859-1
- then Windows XP listing netlogon share with file "täst" (working fine)
- then Windows XP reading "täst" file results in message that file cannot be read
obviously Samba correctly probles that the iconv implementation does not support the "iso8859-1" charset. Samba proceeds anyway and logs that it will "replace with conversion from ASCII to ASCII".
Then it finally calles:
[2006/10/05 13:12:35, 3] lib/charcnv.c:convert_string_internal(253)
E2BIG: convert_string(iso8859-1,UTF-16LE): srclen=2 destlen=2 - 'äst'
It's strange that the directory listing can be done probably by accident, and very strange. Then (by less accident) it fails with conversion when file should be read.
IMHO smbd should refuse to start at all if a charset is configured with is obviously unsupported by iconv. Using replacement conversions will just hide errors for some time and is a stumble stone for users.