Ignore:
Timestamp:
Jul 31, 2009, 1:41:17 PM (16 years ago)
Author:
Silvan Scherrer
Message:

attemp to fix ticket 100 in the 3.0 tree

File:
1 edited

Legend:

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

    r236 r307  
    14611461        string_set(&Globals.szGuestaccount, GUEST_ACCOUNT);
    14621462
     1463#if defined (__OS2__)
     1464        /* search the system codepage and set OS2CodePageStr */
     1465        unsigned long _System DosQueryCp (unsigned long ulLength, unsigned long *pCodePageList, unsigned long *pDataLength);
     1466        pstring OS2CodePageStr;
     1467        unsigned long OS2CodePage[3];
     1468        unsigned long OS2CodePageLen;
     1469        if ( DosQueryCp( sizeof(OS2CodePage), OS2CodePage, &OS2CodePageLen ) )
     1470           slprintf(OS2CodePageStr, sizeof(OS2CodePageStr) -1, "SYSTEM");
     1471          else
     1472           slprintf(OS2CodePageStr, sizeof(OS2CodePageStr) -1, "IBM-%u", OS2CodePage[0]);
     1473#endif
     1474
    14631475#ifndef __OS2__
    14641476        /* using UTF8 by default allows us to support all chars */
     
    14661478#else
    14671479        /* On OS/2, using UTF8 causes problems with display of foreign
    1468            characters - default to IBM-850 codepage */
    1469         string_set(&Globals.unix_charset, "IBM-850");
     1480           characters - default to system codepage */
     1481        string_set(&Globals.unix_charset, OS2CodePageStr);
    14701482#endif
    14711483
     
    14781490#else
    14791491        /* On OS/2, using UTF8 causes problems with display of foreign
    1480            characters - default to IBM-850 codepage */
    1481         string_set(&Globals.display_charset, "IBM-850");
     1492           characters - default to system codepage */
     1493        string_set(&Globals.display_charset, OS2CodePageStr);
    14821494#endif 
    14831495
     
    14911503#else
    14921504        /* On OS/2, using UTF8 causes problems with display of foreign
    1493            characters - default to IBM-850 codepage */
    1494         string_set(&Globals.dos_charset, "IBM-850");
     1505           characters - default to system codepage */
     1506        string_set(&Globals.dos_charset, OS2CodePageStr);
    14951507#endif
    14961508        /*
Note: See TracChangeset for help on using the changeset viewer.