Changeset 236 for branches/samba-3.0/source/lib
- Timestamp:
- May 29, 2009, 8:04:03 AM (16 years ago)
- File:
-
- 1 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,
Note:
See TracChangeset
for help on using the changeset viewer.