samba-3.0.0beta1 codeset issue on non-Linux

David Lee t.d.lee at durham.ac.uk
Wed Jun 11 15:06:21 GMT 2003


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/CP850.so': ld.so.1: /usr/samba/bin/testparm: fatal: /etc/samba/charset/CP850.so: 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 "configure.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 "configure.in" try harder, using a variety of charsets,
   including at least "ASCII", "UCS-2LE", "UTF-8", "CP850"?

o  Presumably at least one of the above codesets (to? from?) ought to be
   a suitable one for "param/loadparm.c".

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>>);


Does that sound reasonable?  If so, and if someone with a knowledge of
codesets (what's valid where? CP850?) can guide me, I'll be happy to try
to produce a patch.


-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 334 2752                  U.K.                  :



More information about the samba-technical mailing list