Changeset 337 for branches/samba-3.0/source/lib/charcnv.c
- Timestamp:
- Oct 8, 2009, 8:01:00 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/lib/charcnv.c
r236 r337 56 56 { 57 57 const char *ret = NULL; 58 #ifndef __OS2__59 58 if (ch == CH_UTF16LE) ret = "UTF-16LE"; 60 59 else if (ch == CH_UTF16BE) ret = "UTF-16BE"; 61 #else62 if (ch == CH_UTF16LE) ret = "IBM-1200";63 else if (ch == CH_UTF16BE) ret = "IBM-1200";64 #endif65 60 else if (ch == CH_UNIX) ret = lp_unix_charset(); 66 61 else if (ch == CH_DOS) ret = lp_dos_charset(); … … 93 88 94 89 if (!ret || !*ret) ret = "ASCII"; 95 DEBUG(10, ("codepage: %s\n",ret));96 90 return ret; 97 91 } … … 397 391 return 0; 398 392 399 // DEBUG(10, ("convert_string: 1"));400 401 393 if (from != CH_UTF16LE && from != CH_UTF16BE && to != CH_UTF16LE && to != CH_UTF16BE) { 402 394 const unsigned char *p = (const unsigned char *)src; … … 406 398 unsigned char lastp = '\0'; 407 399 size_t retval = 0; 408 409 // DEBUG(10, ("convert_string: 2"));410 400 411 401 /* If all characters are ascii, fast path here. */ … … 436 426 } 437 427 return retval; 438 // DEBUG(10, ("convert_string: 3"));439 428 440 429 } else if (from == CH_UTF16LE && to != CH_UTF16LE) { … … 462 451 goto general_case; 463 452 #else 464 453 return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv); 465 454 #endif 466 455 } … … 474 463 } 475 464 return retval; 476 // DEBUG(10, ("convert_string: 4"));477 465 478 466 } else if (from != CH_UTF16LE && from != CH_UTF16BE && to == CH_UTF16LE) { … … 517 505 general_case: 518 506 #endif 507 519 508 return convert_string_internal(from, to, src, srclen, dest, destlen, allow_bad_conv); 520 509 } … … 593 582 594 583 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));598 584 599 585 retval = smb_iconv(descriptor,
Note:
See TracChangeset
for help on using the changeset viewer.