samba-3.0.0beta1 codeset issue on non-Linux

Jelmer Vernooij jelmer at
Wed Jun 11 16:13:55 GMT 2003

On Wed, Jun 11, 2003 at 04:06:21PM +0100, David Lee wrote about 'samba-3.0.0beta1 codeset issue on non-Linux':
> 3.0.0beta1 seems to have a codeset issue on non-Linux machines.  These
> have been briefly mentioned in bugzilla 150.  There, a couple of us
> independently noticed that some sample programs, e.g. "testparm" give
> several error messages of the form:
>    Error loading module '/etc/samba/charset/': /usr/samba/bin/testparm: fatal: /etc/samba/charset/ open failed: No such file or directory
>    Conversion from UCS-2LE to CP850 not supported

> Also the "Recent Builds" from the build farm also expose it: visit some
> random IRIX, Solaris, *BSD entries and find similar-looking messages.

> I have looked a little deeper.  But my knowledge of codesets is (how shall
> I put it?) "poor".

> I suspect we might have two problems:

> 1. The messages involve "CP850", and this seems related to the line in
>    "param/loadparm.c":
>       string_set(&Globals.dos_charset, "CP850");
>    Is "CP850 the correct thing to be using here?

> 2. The AC_TRY_RUN test in "" is based upon:
>       iconv_open("ASCII", "UCS-2LE");
>    But Solaris (at least), while having support for codeset conversions,
>    seems not to have any involving "ASCII".  There are plenty involving
>    "UCS-2LE" (and "UTF-8") and a small number involving "CP850"
>    So, based on this one limited test, "configure" erroneously concludes
>    that it cannot do chareset translation: clearly wrong.

> We probably need to rethink this issue for portability (beyond Linux!).

> o  Is "CP850" still the correct default for "param/loadparm.c"?

> o  Should "" try harder, using a variety of charsets,
>    including at least "ASCII", "UCS-2LE", "UTF-8", "CP850"?
No, but we might want to add a builtin conversion to and from CP850.

> o  Given this more generous "configure" test, can configure then do some
>    relevant "#define"s, so that "param/loadparm.c" can do something like:
>       string_set(&Globals.dos_charset, <<CHARSET-FROM-CONFIGURE>>);
I don't like the idea of having a default value for "dos charset" that
is not consistent. 

Does anyone have objections against a builtin function for conversion
to/from CP850?


Jelmer Vernooij                                      <jelmer at>
Last CVS commit: Wed Jun 11 15:59:55 2003 (10m ago)
Bugs in bugzilla: 21 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list