[Samba] Conversion error: Illegal multibyte sequence

Laurent Blume laurent+samba at elanor.org
Thu Sep 5 14:15:16 MDT 2013

Hello list,

I've noticed this problem for a few years now, I think. I see it popped
out now and then in discussions. But they always end before a solution
is given.

So let's try one more time :-)

I have plenty of UTF-8 named files and directories. It's UTF-8 all
round, I don't use anything else, so I have no doubt the byte sequences
are correct in the filesystem (I happen to have accented Latin chars,
Chinese, Japanese, and some non-letters chars, so it'd show up really
quick if there was an issue there :-)

I see those kind of errors in the logs, here about a directory named
Please note: those lines are a direct copy of the log. So yes, the "♻"
character is indeed correct in the two first entries (including the
first conversion error line), but improperly logged as an invalid byte
sequence in the two latter entries, and those two have different lengths.

[2013/09/05 20:43:50.280597,  3] smbd/dir.c:1046(smbd_dirptr_get_entry)
  smbd_dirptr_get_entry mask=[*] found ./♻_Corbeille fname=♻_Corbeille
[2013/09/05 20:43:50.280641,  3] lib/charcnv.c:161(convert_string_internal)
  convert_string_internal: Conversion error: Illegal multibyte
[2013/09/05 20:43:50.280679,  3] lib/charcnv.c:140(convert_string_internal)
  convert_string_internal: Conversion error: Incomplete multibyte
[2013/09/05 20:43:50.280715,  3] lib/charcnv.c:140(convert_string_internal)
  convert_string_internal: Conversion error: Incomplete multibyte

It does not prevent using the directory, and it displays properly on
Windows clients. So the issue is merely an annoying flood of logs.

The system is Solaris 10, running Samba 3.6.18 linked against GNU
libiconv 1.14.

The charsets are defined like this in the configuration:

  dos charset          = cp850
  unix charset         = UTF8
  display charset      = UTF8

So, any definitive fix for that?



More information about the samba mailing list