Where to patch for toupper/tolower, locale

Ihar Viarheichyk i.viarheichyk at sam-solutions.net
Mon Nov 19 03:21:02 GMT 2001

On Sat, Nov 17, 2001 at 08:21:45AM +0200, Deniz Akkus Kanca wrote:

> When system locale is not set to Turkish, smb.conf is read in, character set 
> field is recognized and the correct charmap file name is derived from 
> upper-casing the character set field and concatting in various ways.
Seems this is the best way to solve the problem. Just set locale to C
when starting samba daemons. BTW, samba itself sets LC_ALL to C in
> When system locale is set to Turkish, character set field is read in and 
> upper cased to form the file name. Since the upper casing is different in 
> Turkish for i, the charset files looked for are xxx-?SO8859-9 (idot), which 
> fails. 
> Samba installations using Turkish charmaps may or may not have their system 
> locale set to Turkish. Currently, if they do not, everything works fine. If 
> they do, charset map files can't be located, which shows up in error message 
> in log.smbd . 
> There are various ways of getting around the problem: 
> 1. smb.conf can be made to accept upper case charset definitions in 
> lib/charcnv.c .
> 2. a setlocale can be done (there is an ifdef'd setlocale statement in 
> charset_initialize in lib/charset.c ) so that samba does not use Turkish 
> locale.
> 3. The specific function making up the file names can be made to do something 
> different if locale is Turkish ( load_unicode_unix_map in lib/util_unistr.c )
> 4. Definition of strupper can be changed.

> And probably a lot more...
make a softlink <turkish_I>SO8859-9 -> ISO8859-9 when installing samba?

This is not a good idea to make workaround in samba code for one
particular language if the problem can be solved in other way.

Igor Vergeichik
ICQ 47298730

More information about the samba-technical mailing list