• Home
  • Raw
  • Download

Lines Matching refs:cnv

403          UConverter *cnv=NULL;  in TestConvert()  local
405 cnv=ucnv_open("ibm-949,Madhu", &err); in TestConvert()
409 ucnv_close(cnv); in TestConvert()
674 UConverter *cnv=ucnv_open("ISO_2022", &err); in TestConvert() local
678 c=ucnv_getNextUChar(cnv, &source, limit, &err); in TestConvert()
682 ucnv_reset(cnv); in TestConvert()
683 ucnv_close(cnv); in TestConvert()
1182 UConverter *cnv; in TestAlias() local
1190 cnv = ucnv_open(name, &status); in TestAlias()
1197 if (strcmp(ucnv_getName(cnv, &status), name) != 0 in TestAlias()
1201 name, ucnv_getName(cnv, &status)); in TestAlias()
1204 ucnv_close(cnv); in TestAlias()
1694 UConverter * cnv, *cnv2; in TestConvertSafeClone() local
1712 cnv = ucnv_open(names[0], &err); in TestConvertSafeClone()
1718 if (NULL != ucnv_safeClone(cnv, buffer[0], &bufferSize, NULL)) in TestConvertSafeClone()
1724 … if (NULL != ucnv_safeClone(cnv, buffer[0], &bufferSize, &err) || err != U_MEMORY_ALLOCATION_ERROR) in TestConvertSafeClone()
1731 if (NULL == (cnv2 = ucnv_safeClone(cnv, buffer[0], NULL, &err)) || U_FAILURE(err)) in TestConvertSafeClone()
1740 …if (NULL != ucnv_safeClone(cnv, buffer[0], &bufferSize, &err) || U_FAILURE(err) || bufferSize <= 0) in TestConvertSafeClone()
1750 if (NULL == (cnv2 = ucnv_safeClone(cnv, buffer[0], &bufferSize, &err)) || U_FAILURE(err)) in TestConvertSafeClone()
1760 …if (NULL == (cnv2 = ucnv_safeClone(cnv, NULL, &bufferSize, &err)) || err != U_SAFECLONE_ALLOCATED_… in TestConvertSafeClone()
1772 …if (NULL == (cnv2 = ucnv_safeClone(cnv, NULL, &bufferSize, &err)) || err != U_SAFECLONE_ALLOCATED_… in TestConvertSafeClone()
1788 ucnv_close(cnv); in TestConvertSafeClone()
1800 cnv = ucnv_open(names[idx], &err); in TestConvertSafeClone()
1809 ucnv_safeClone(cnv, NULL, &actualSizes[idx], &err); in TestConvertSafeClone()
1819 cnv2 = ucnv_safeClone(cnv, buffer[1], &bufferSize, &err); in TestConvertSafeClone()
1822 ucnv_close(cnv); in TestConvertSafeClone()
1894 UConverter *cnv; in TestCCSID() local
1903 cnv=ucnv_openCCSID(ccsid, UCNV_IBM, &errorCode); in TestCCSID()
1909 if(ccsid!=ucnv_getCCSID(cnv, &errorCode)) { in TestCCSID()
1910 … log_err("error: ucnv_getCCSID(ucnv_openCCSID(%ld))=%ld\n", ccsid, ucnv_getCCSID(cnv, &errorCode)); in TestCCSID()
1914 if(ccsid != 1392 && UCNV_IBM!=ucnv_getPlatform(cnv, &errorCode)) { in TestCCSID()
1915 … ucnv_getPlatform(ucnv_openCCSID(%ld))=%ld!=UCNV_IBM\n", ccsid, ucnv_getPlatform(cnv, &errorCode)); in TestCCSID()
1918 ucnv_close(cnv); in TestCCSID()
2450 static UBool getTestChar(UConverter *cnv, const char *converterName, in getTestChar() argument
2466 ucnv_getUnicodeSet(cnv, set, UCNV_ROUNDTRIP_SET, &errorCode); in getTestChar()
2477 ucnv_fromUnicode(cnv, in getTestChar()
2485 ucnv_fromUnicode(cnv, in getTestChar()
2518 static void testFromTruncatedUTF8(UConverter *utf8Cnv, UConverter *cnv, const char *converterName, in testFromTruncatedUTF8() argument
2562 ucnv_convertEx(cnv, utf8Cnv, in testFromTruncatedUTF8()
2584 static void testFromBadUTF8(UConverter *utf8Cnv, UConverter *cnv, const char *converterName, in testFromBadUTF8() argument
2626 convertExMultiStreaming(utf8Cnv, cnv, in testFromBadUTF8()
2645 UConverter *utf8Cnv, *cnv; in TestConvertExFromUTF8() local
2662 cnv=ucnv_open(converterNames[i], &errorCode); in TestConvertExFromUTF8()
2667 …if(!getTestChar(cnv, converterNames[i], charUTF8, &charUTF8Length, char0, &char0Length, char1, &ch… in TestConvertExFromUTF8()
2670 …testFromTruncatedUTF8(utf8Cnv, cnv, converterNames[i], charUTF8, charUTF8Length, char0, char0Lengt… in TestConvertExFromUTF8()
2671 …testFromBadUTF8(utf8Cnv, cnv, converterNames[i], charUTF8, charUTF8Length, char0, char0Length, cha… in TestConvertExFromUTF8()
2672 ucnv_close(cnv); in TestConvertExFromUTF8()
2688 UConverter *utf8Cnv, *cnv; in TestConvertExFromUTF8_C5F0() local
2721 cnv=ucnv_open(converterNames[i], &errorCode); in TestConvertExFromUTF8_C5F0()
2722 ucnv_setFromUCallBack(cnv, UCNV_FROM_U_CALLBACK_ESCAPE, UCNV_ESCAPE_XML_DEC, in TestConvertExFromUTF8_C5F0()
2746 cnv, utf8Cnv, in TestConvertExFromUTF8_C5F0()
2757 ucnv_close(cnv); in TestConvertExFromUTF8_C5F0()
2791 UConverter *cnv; in TestConvertAlgorithmic() local
2797 cnv=ucnv_open("Shift-JIS", &errorCode); in TestConvertAlgorithmic()
2800 ucnv_close(cnv); in TestConvertAlgorithmic()
2816 …length=ucnv_fromAlgorithmic(cnv, UCNV_UTF8, target, sizeof(shiftJIS), (const char *)utf8, sizeof(u… in TestConvertAlgorithmic()
2828 length=ucnv_toAlgorithmic(UCNV_UTF8, cnv, target, sizeof(target), shiftJISNUL, -1, &errorCode); in TestConvertAlgorithmic()
2839 length=ucnv_toAlgorithmic(UCNV_UTF8, cnv, target, sizeof(target), shiftJISNUL, 0, &errorCode); in TestConvertAlgorithmic()
2849 length=ucnv_fromAlgorithmic(cnv, UCNV_UTF16, target, 0, (const char *)utf16, 2, &errorCode); in TestConvertAlgorithmic()
2859 length=ucnv_fromAlgorithmic(cnv, UCNV_UTF32, target, 0, (const char *)utf32, 4, &errorCode); in TestConvertAlgorithmic()
2870 length=ucnv_fromAlgorithmic(cnv, UCNV_UTF16, target, 0, (const char *)utf16, 2, &errorCode); in TestConvertAlgorithmic()
2877 length=ucnv_fromAlgorithmic(cnv, UCNV_UTF16, target, 0, NULL, 2, &errorCode); in TestConvertAlgorithmic()
2884 …length=ucnv_fromAlgorithmic(cnv, (UConverterType)99, target, 0, (const char *)utf16, 2, &errorCode… in TestConvertAlgorithmic()
2888 ucnv_close(cnv); in TestConvertAlgorithmic()
2946 UConverter *cnv = cnv_open(converter[idx].name, &status); in TestLMBCSMaxChar() local
2950 if (converter[idx].maxSize != ucnv_getMaxCharSize(cnv)) { in TestLMBCSMaxChar()
2952 converter[idx].name, converter[idx].maxSize, ucnv_getMaxCharSize(cnv)); in TestLMBCSMaxChar()
2954 ucnv_close(cnv); in TestLMBCSMaxChar()
2966 UConverter *cnv; in TestJ1968() local
2976 cnv = ucnv_openU(myConvNameU, &err); in TestJ1968()
2977 if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) { in TestJ1968()
2983 cnv = ucnv_openU(myConvNameU, &err); in TestJ1968()
2984 if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) { in TestJ1968()
2990 cnv = ucnv_openU(myConvNameU, &err); in TestJ1968()
2991 if (cnv || err != U_FILE_ACCESS_ERROR) { in TestJ1968()
2999 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3000 if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) { in TestJ1968()
3006 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3007 if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) { in TestJ1968()
3013 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3014 if (cnv || err != U_FILE_ACCESS_ERROR) { in TestJ1968()
3021 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3022 if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) { in TestJ1968()
3029 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3030 if (cnv || err != U_FILE_ACCESS_ERROR) { in TestJ1968()
3036 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3037 if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) { in TestJ1968()
3043 cnv = ucnv_open(myConvName, &err); in TestJ1968()
3044 if (cnv || err != U_FILE_ACCESS_ERROR) { in TestJ1968()
3073 UConverter *cnv, *swapCnv; in testSwap() local
3084 cnv=ucnv_open(name, &errorCode); in testSwap()
3106 …ucnv_fromUnicode(cnv, &pc, normal+UPRV_LENGTHOF(normal), &pcu, text+UPRV_LENGTHOF(text), NULL, TRU… in testSwap()
3144 …ucnv_toUnicode(cnv, &pu, uNormal+UPRV_LENGTHOF(uNormal), (const char **)&pc, normal+normalLength, … in testSwap()
3181 ucnv_close(cnv); in testSwap()
3226 UConverter* cnv = ucnv_openPackage(loadTestData(&status), "test3", &status); in TestFromUCountPending() local
3238 ucnv_reset(cnv); in TestFromUCountPending()
3239 ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestFromUCountPending()
3240 len = ucnv_fromUCountPending(cnv, &status); in TestFromUCountPending()
3273 ucnv_reset(cnv); in TestFromUCountPending()
3274 ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestFromUCountPending()
3275 len = ucnv_fromUCountPending(cnv, &status); in TestFromUCountPending()
3285 ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestFromUCountPending()
3286 len = ucnv_fromUCountPending(cnv, &status); in TestFromUCountPending()
3296 ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestFromUCountPending()
3301 len = ucnv_fromUCountPending(cnv, &status); in TestFromUCountPending()
3310 ucnv_close(cnv); in TestFromUCountPending()
3331 UConverter* cnv = ucnv_openPackage(loadTestData(&status), "test3", &status); in TestToUCountPending() local
3336 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, oldToUAction, NULL, &status); in TestToUCountPending()
3344 ucnv_reset(cnv); in TestToUCountPending()
3345 ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestToUCountPending()
3346 len = ucnv_toUCountPending(cnv,&status); in TestToUCountPending()
3357 ucnv_close(cnv); in TestToUCountPending()
3381 cnv = ucnv_openPackage(loadTestData(&status), "test4", &status); in TestToUCountPending()
3386 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, oldToUAction, NULL, &status); in TestToUCountPending()
3387 ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestToUCountPending()
3388 len = ucnv_toUCountPending(cnv,&status); in TestToUCountPending()
3397 ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestToUCountPending()
3398 len = ucnv_toUCountPending(cnv,&status); in TestToUCountPending()
3409 ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status); in TestToUCountPending()
3414 len = ucnv_toUCountPending(cnv,&status); in TestToUCountPending()
3422 ucnv_close(cnv); in TestToUCountPending()
3429 UConverter *cnv; in TestOneDefaultNameChange() local
3435 cnv=ucnv_open(NULL, &status); in TestOneDefaultNameChange()
3436 if (U_FAILURE(status) || cnv == NULL) { in TestOneDefaultNameChange()
3440 if(strcmp(ucnv_getName(cnv, &status), expected)==0) in TestOneDefaultNameChange()
3444 ucnv_close(cnv); in TestOneDefaultNameChange()
3532 UConverter *cnv; in TestSubstString() local
3539 cnv=ucnv_open("UTF-16", &errorCode); in TestSubstString()
3544 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode); in TestSubstString()
3545 ucnv_close(cnv); in TestSubstString()
3554 cnv=ucnv_open("UTF-32", &errorCode); in TestSubstString()
3559 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode); in TestSubstString()
3560 ucnv_close(cnv); in TestSubstString()
3570 cnv=ucnv_open("ISO-8859-1", &errorCode); in TestSubstString()
3575 ucnv_setSubstString(cnv, sub, UPRV_LENGTHOF(sub), &errorCode); in TestSubstString()
3580 ucnv_getSubstChars(cnv, buffer, &len8, &errorCode); in TestSubstString()
3586 ucnv_close(cnv); in TestSubstString()
3590 cnv=ucnv_open("HZ", &errorCode); in TestSubstString()
3595 ucnv_setSubstString(cnv, sub, UPRV_LENGTHOF(sub), &errorCode); in TestSubstString()
3600 ucnv_getSubstChars(cnv, buffer, &len8, &errorCode); in TestSubstString()
3606 ucnv_close(cnv); in TestSubstString()
3618 UConverter *cnv; in InvalidArguments() local
3627 cnv=ucnv_open("UTF-8", &errorCode); in InvalidArguments()
3635 …ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsPtr, ucharsBadPtr, NULL, TRUE, &… in InvalidArguments()
3642 …ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsBadPtr, ucharsPtr, NULL, TRUE, &… in InvalidArguments()
3649 …ucnv_toUnicode(cnv, &ucharsPtr, ucharsBadPtr, (const char **)&charsPtr, charsPtr, NULL, TRUE, &err… in InvalidArguments()
3656 …ucnv_toUnicode(cnv, &ucharsBadPtr, ucharsPtr, (const char **)&charsPtr, charsPtr, NULL, TRUE, &err… in InvalidArguments()
3667 ucnv_close(cnv); in InvalidArguments()
3682 UConverter *cnv = ucnv_open(names[i], &errorCode); in TestGetName() local
3684 const char *name = ucnv_getName(cnv, &errorCode); in TestGetName()
3689 ucnv_close(cnv); in TestGetName()
3725 UConverter *cnv = ucnv_open(names[i], &errorCode); in TestUTFBOM() local
3732 length = ucnv_fromUChars(cnv, bytes, (int32_t)sizeof(bytes), a16, 1, &errorCode); in TestUTFBOM()
3738 ucnv_close(cnv); in TestUTFBOM()