Changeset 237
- Timestamp:
- May 29, 2009, 8:29:38 AM (16 years ago)
- Location:
- branches/samba-3.2.x/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/samba-3.2.x/source/lib/charcnv.c ¶
r234 r237 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 } … … 391 396 return 0; 392 397 398 // DEBUG(10, ("convert_string: 1")); 399 393 400 if (from != CH_UTF16LE && from != CH_UTF16BE && to != CH_UTF16LE && to != CH_UTF16BE) { 394 401 const unsigned char *p = (const unsigned char *)src; … … 398 405 unsigned char lastp = '\0'; 399 406 size_t retval = 0; 407 408 // DEBUG(10, ("convert_string: 2")); 400 409 401 410 /* If all characters are ascii, fast path here. */ … … 430 439 } 431 440 return retval; 441 // DEBUG(10, ("convert_string: 3")); 442 432 443 } else if (from == CH_UTF16LE && to != CH_UTF16LE) { 433 444 const unsigned char *p = (const unsigned char *)src; … … 470 481 } 471 482 return retval; 483 // DEBUG(10, ("convert_string: 4")); 484 472 485 } else if (from != CH_UTF16LE && from != CH_UTF16BE && to == CH_UTF16LE) { 473 486 const unsigned char *p = (const unsigned char *)src; … … 614 627 615 628 again: 629 DEBUG(10,("convert_string_internal: convert_string(%s,%s): srclen=%u destlen=%u\n", 630 charset_name(from), charset_name(to), 631 (unsigned int)srclen, (unsigned int)destlen)); 616 632 617 633 retval = smb_iconv(descriptor, -
TabularUnified branches/samba-3.2.x/source/param/loadparm.c ¶
r235 r237 4613 4613 string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET); 4614 4614 #else 4615 /* On OS/2, using UTF8 causes problems with display of foreign characters - default to SYSTEM codepage */ 4616 string_set(&Globals.unix_charset, "SYSTEM"); 4615 /* On OS/2, using UTF8 causes problems with display of foreign 4616 characters - default to IBM-850 codepage */ 4617 string_set(&Globals.unix_charset, "IBM-850"); 4617 4618 #endif 4618 4619 … … 4620 4621 /* If the system supports nl_langinfo(), try to grab the value 4621 4622 from the user's locale */ 4623 #ifndef __OS2__ 4624 /* this does somehow not work on OS/2 */ 4622 4625 string_set(&Globals.display_charset, "LOCALE"); 4626 #else 4627 /* On OS/2, using UTF8 causes problems with display of foreign 4628 characters - default to IBM-850 codepage */ 4629 string_set(&Globals.display_charset, "IBM-850"); 4630 #endif 4631 4623 4632 #else 4624 4633 string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET); 4625 4634 #endif 4626 4635 4636 #ifndef __OS2__ 4627 4637 /* Use codepage 850 as a default for the dos character set */ 4628 4638 string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET); 4639 #else 4640 /* On OS/2, using UTF8 causes problems with display of foreign 4641 characters - default to IBM-850 codepage */ 4642 string_set(&Globals.dos_charset, "IBM-850"); 4643 #endif 4644 /* 4629 4645 4630 4646 /*
Note:
See TracChangeset
for help on using the changeset viewer.