Changeset 236
- Timestamp:
- May 29, 2009, 8:04:03 AM (16 years ago)
- Location:
- branches/samba-3.0/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/lib/charcnv.c
r165 r236 56 56 { 57 57 const char *ret = NULL; 58 58 #ifndef __OS2__ 59 59 if (ch == CH_UTF16LE) ret = "UTF-16LE"; 60 60 else if (ch == CH_UTF16BE) ret = "UTF-16BE"; 61 #else 62 if (ch == CH_UTF16LE) ret = "IBM-1200"; 63 else if (ch == CH_UTF16BE) ret = "IBM-1200"; 64 #endif 61 65 else if (ch == CH_UNIX) ret = lp_unix_charset(); 62 66 else if (ch == CH_DOS) ret = lp_dos_charset(); … … 89 93 90 94 if (!ret || !*ret) ret = "ASCII"; 95 DEBUG(10, ("codepage: %s\n",ret)); 91 96 return ret; 92 97 } … … 392 397 return 0; 393 398 399 // DEBUG(10, ("convert_string: 1")); 400 394 401 if (from != CH_UTF16LE && from != CH_UTF16BE && to != CH_UTF16LE && to != CH_UTF16BE) { 395 402 const unsigned char *p = (const unsigned char *)src; … … 399 406 unsigned char lastp = '\0'; 400 407 size_t retval = 0; 408 409 // DEBUG(10, ("convert_string: 2")); 401 410 402 411 /* If all characters are ascii, fast path here. */ … … 427 436 } 428 437 return retval; 438 // DEBUG(10, ("convert_string: 3")); 439 429 440 } else if (from == CH_UTF16LE && to != CH_UTF16LE) { 430 441 const unsigned char *p = (const unsigned char *)src; … … 463 474 } 464 475 return retval; 476 // DEBUG(10, ("convert_string: 4")); 477 465 478 } else if (from != CH_UTF16LE && from != CH_UTF16BE && to == CH_UTF16LE) { 466 479 const unsigned char *p = (const unsigned char *)src; … … 580 593 581 594 again: 595 DEBUG(10,("convert_string_internal: convert_string(%s,%s): srclen=%u destlen=%u\n", 596 charset_name(from), charset_name(to), 597 (unsigned int)srclen, (unsigned int)destlen)); 582 598 583 599 retval = smb_iconv(descriptor, -
branches/samba-3.0/source/param/loadparm.c
r165 r236 1465 1465 string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET); 1466 1466 #else 1467 /* On OS/2, using UTF8 causes problems with display of foreign characters - default to SYSTEM codepage */ 1468 string_set(&Globals.unix_charset, "SYSTEM"); 1467 /* 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"); 1469 1470 #endif 1470 1471 … … 1472 1473 /* If the system supports nl_langinfo(), try to grab the value 1473 1474 from the user's locale */ 1475 #ifndef __OS2__ 1476 /* this does somehow not work on OS/2 */ 1474 1477 string_set(&Globals.display_charset, "LOCALE"); 1478 #else 1479 /* 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"); 1482 #endif 1483 1475 1484 #else 1476 1485 string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET); … … 1481 1490 string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET); 1482 1491 #else 1483 /* On OS/2, using UTF8 causes problems with display of foreign characters - default to SYSTEM codepage */ 1484 string_set(&Globals.dos_charset, "SYSTEM"); 1492 /* 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"); 1485 1495 #endif 1486 1496 /*
Note:
See TracChangeset
for help on using the changeset viewer.