Changeset 237 for branches/samba-3.2.x/source/lib/charcnv.c
- Timestamp:
- May 29, 2009, 8:29:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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,
Note:
See TracChangeset
for help on using the changeset viewer.