Ignore:
Timestamp:
Jul 31, 2009, 2:01:36 PM (16 years ago)
Author:
Silvan Scherrer
Message:

attemp to fix ticket 100 in the 3.3 tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/param/loadparm.c

    r274 r308  
    46494649        string_set(&Globals.szGuestaccount, GUEST_ACCOUNT);
    46504650
     4651#if defined (__OS2__)
     4652        /* search the system codepage and set OS2CodePageStr */
     4653        unsigned long _System DosQueryCp (unsigned long ulLength, unsigned long *pCodePageList, unsigned long *pDataLength);
     4654        char *OS2CodePageStr=NULL;
     4655        unsigned long OS2CodePage[3];
     4656        unsigned long OS2CodePageLen;
     4657        if ( DosQueryCp( sizeof(OS2CodePage), OS2CodePage, &OS2CodePageLen ) )
     4658           asprintf(&OS2CodePageStr, "SYSTEM");
     4659          else
     4660           asprintf(&OS2CodePageStr, "IBM-%u", OS2CodePage[0]);
     4661#endif
     4662
    46514663#ifndef __OS2__
    46524664        /* using UTF8 by default allows us to support all chars */
     
    46544666#else
    46554667        /* On OS/2, using UTF8 causes problems with display of foreign
    4656            characters - default to IBM-850 codepage */
    4657         string_set(&Globals.unix_charset, "IBM-850");
     4668           characters - default to system codepage */
     4669        string_set(&Globals.unix_charset, OS2CodePageStr);
    46584670#endif
    46594671
     
    46664678#else
    46674679        /* On OS/2, using UTF8 causes problems with display of foreign
    4668            characters - default to IBM-850 codepage */
    4669         string_set(&Globals.display_charset, "IBM-850");
     4680           characters - default to system codepage */
     4681        string_set(&Globals.display_charset, OS2CodePageStr);
    46704682#endif 
    46714683
     
    46794691#else
    46804692        /* On OS/2, using UTF8 causes problems with display of foreign
    4681            characters - default to IBM-850 codepage */
    4682         string_set(&Globals.dos_charset, "IBM-850");
     4693           characters - default to system codepage */
     4694        string_set(&Globals.dos_charset, OS2CodePageStr);
    46834695#endif
    46844696
Note: See TracChangeset for help on using the changeset viewer.