Lines Matching refs:cnv
31 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t res…
32 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode e…
120 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
131 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err) in my_ucnv_open() argument
133 if(cnv && cnv[0] == '@') { in my_ucnv_open()
134 return ucnv_openPackage(loadTestData(err), cnv+1, err); in my_ucnv_open()
136 return ucnv_open(cnv, err); in my_ucnv_open()
176 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], cons… in TestNextUChar() argument
186 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUChar()
206 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, con… in TestNextUCharError() argument
211 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUCharError()
1459 TestAmbiguousConverter(UConverter *cnv) { in TestAmbiguousConverter() argument
1472 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode); in TestAmbiguousConverter()
1485 isAmbiguous=ucnv_isAmbiguous(cnv); in TestAmbiguousConverter()
1490 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous); in TestAmbiguousConverter()
1496 ucnv_fixFileSeparator(cnv, outUnicode, (int32_t)(u-outUnicode)); in TestAmbiguousConverter()
1499 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode)); in TestAmbiguousConverter()
1508 UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv; in TestAmbiguous() local
1525 cnv=ucnv_open(name, &status); in TestAmbiguous()
1528 const char* cnvName = ucnv_getName(cnv, &status); in TestAmbiguous()
1531 TestAmbiguousConverter(cnv); in TestAmbiguous()
1534 ucnv_close(cnv); in TestAmbiguous()
1836 UConverter *cnv=ucnv_open("UTF-7", &errorCode); in TestUTF7() local
1841 TestNextUChar(cnv, source, limit, results, "UTF-7"); in TestUTF7()
1843 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF7()
1844 cnvName = ucnv_getName(cnv, &errorCode); in TestUTF7()
1848 ucnv_close(cnv); in TestUTF7()
1879 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode); in TestIMAP() local
1884 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name"); in TestIMAP()
1886 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestIMAP()
1887 cnvName = ucnv_getName(cnv, &errorCode); in TestIMAP()
1891 ucnv_close(cnv); in TestIMAP()
1941 UConverter *cnv=ucnv_open("UTF-8", &errorCode); in TestUTF8() local
1946 TestNextUChar(cnv, source, limit, results, "UTF-8"); in TestUTF8()
1948 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF8()
1951 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF8()
1954 TestNextUChar(cnv, source, limit, results2, "UTF-8"); in TestUTF8()
1956 ucnv_close(cnv); in TestUTF8()
2012 UConverter *cnv=ucnv_open("CESU-8", &errorCode); in TestCESU8() local
2017 TestNextUChar(cnv, source, limit, results, "CESU-8"); in TestCESU8()
2019 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestCESU8()
2022 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestCESU8()
2025 TestNextUChar(cnv, source, limit, results2, "CESU-8"); in TestCESU8()
2027 ucnv_close(cnv); in TestCESU8()
2064 UConverter *cnv=ucnv_open("UTF-16", &errorCode); in TestUTF16() local
2071 TestNextUChar(cnv, source, limit, results1, "UTF-16"); in TestUTF16()
2074 ucnv_resetToUnicode(cnv); in TestUTF16()
2075 TestNextUChar(cnv, source, limit, results2, "UTF-16"); in TestUTF16()
2078 ucnv_resetToUnicode(cnv); in TestUTF16()
2079 TestNextUChar(cnv, source, limit, results3, "UTF-16"); in TestUTF16()
2082 ucnv_resetToUnicode(cnv); in TestUTF16()
2083 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16()
2085 ucnv_close(cnv); in TestUTF16()
2112 UConverter *cnv=ucnv_open("utf-16be", &errorCode); in TestUTF16BE() local
2117 TestNextUChar(cnv, source, limit, results, "UTF-16BE"); in TestUTF16BE()
2119 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16BE()
2123 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16BE()
2124 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2137 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2140 ucnv_close(cnv); in TestUTF16BE()
2166 UConverter *cnv=ucnv_open("utf-16le", &errorCode); in TestUTF16LE() local
2171 TestNextUChar(cnv, source, limit, results, "UTF-16LE"); in TestUTF16LE()
2173 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16LE()
2177 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16LE()
2178 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2191 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2195 ucnv_close(cnv); in TestUTF16LE()
2232 UConverter *cnv=ucnv_open("UTF-32", &errorCode); in TestUTF32() local
2239 TestNextUChar(cnv, source, limit, results1, "UTF-32"); in TestUTF32()
2242 ucnv_resetToUnicode(cnv); in TestUTF32()
2243 TestNextUChar(cnv, source, limit, results2, "UTF-32"); in TestUTF32()
2246 ucnv_resetToUnicode(cnv); in TestUTF32()
2247 TestNextUChar(cnv, source, limit, results3, "UTF-32"); in TestUTF32()
2250 ucnv_resetToUnicode(cnv); in TestUTF32()
2251 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32()
2253 ucnv_close(cnv); in TestUTF32()
2308 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode); in TestUTF32BE() local
2313 TestNextUChar(cnv, source, limit, results, "UTF-32BE"); in TestUTF32BE()
2316 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32BE()
2319 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32BE()
2322 TestNextUChar(cnv, source, limit, results2, "UTF-32BE"); in TestUTF32BE()
2324 ucnv_close(cnv); in TestUTF32BE()
2379 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode); in TestUTF32LE() local
2384 TestNextUChar(cnv, source, limit, results, "UTF-32LE"); in TestUTF32LE()
2387 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32LE()
2390 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32LE()
2393 TestNextUChar(cnv, source, limit, results2, "UTF-32LE"); in TestUTF32LE()
2395 ucnv_close(cnv); in TestUTF32LE()
2512 UConverter *cnv=ucnv_open("LATIN_1", &errorCode); in TestLATIN1() local
2517 TestNextUChar(cnv, source, limit, results, "LATIN_1"); in TestLATIN1()
2519 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestLATIN1()
2523 ucnv_close(cnv); in TestLATIN1()
2543 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode); in TestSBCS() local
2548 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)"); in TestSBCS()
2550 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestSBCS()
2558 ucnv_close(cnv); in TestSBCS()
2586 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode); in TestDBCS() local
2591 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)"); in TestDBCS()
2593 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestDBCS()
2597 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestDBCS()
2602 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestDBCS()
2603 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestDBCS()
2605 ucnv_close(cnv); in TestDBCS()
2637 UConverter *cnv=ucnv_open("ibm-1363", &errorCode); in TestMBCS() local
2642 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)"); in TestMBCS()
2644 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestMBCS()
2648 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestMBCS()
2653 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestMBCS()
2654 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestMBCS()
2656 ucnv_close(cnv); in TestMBCS()
2672 UConverter *cnv=ucnv_open(cnvName, &status); in TestICCRunout() local
2683 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status); in TestICCRunout()
2696 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2699 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2702 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2711 ucnv_close(cnv); in TestICCRunout()
2746 UConverter *cnv; in TestISO_2022() local
2748 cnv=ucnv_open("ISO_2022", &errorCode); in TestISO_2022()
2753 TestNextUChar(cnv, source, limit, results, "ISO_2022"); in TestISO_2022()
2756 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source"); in TestISO_2022()
2757 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestISO_2022()
2761 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022()
2762 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestISO_2022()
2767 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR… in TestISO_2022()
2769 ucnv_close(cnv); in TestISO_2022()
2775 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallTargetBuffer() argument
2792 ucnv_reset(cnv); in TestSmallTargetBuffer()
2805 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallTargetBuffer()
2821 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallTargetBuffer()
2844 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestToAndFromUChars() argument
2865 ucnv_reset(cnv); in TestToAndFromUChars()
2866 …numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)… in TestToAndFromUChars()
2873 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode); in TestToAndFromUChars()
2891 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallSourceBuffer() argument
2910 ucnv_reset(cnv); in TestSmallSourceBuffer()
2925 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallSourceBuffer()
2943 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallSourceBuffer()
2966 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit, in TestGetNextUChar2022() argument
2973 ucnv_reset(cnv); in TestGetNextUChar2022()
2976 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestGetNextUChar2022()
3097 UConverter *cnv; in TestHZ() local
3100 cnv=ucnv_open("HZ", &errorCode); in TestHZ()
3114 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestHZ()
3123 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestHZ()
3137 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding"); in TestHZ()
3138 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3139 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3140 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3142 ucnv_close(cnv); in TestHZ()
3316 UConverter *cnv; in TestISO_2022_JP() local
3319 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP()
3333 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP()
3342 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP()
3358 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3359 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3360 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding"); in TestISO_2022_JP()
3361 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3363 ucnv_close(cnv); in TestISO_2022_JP()
3382 UConverter *cnv; in TestConv() local
3385 cnv=my_ucnv_open(conv, &errorCode); in TestConv()
3399 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestConv()
3409 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3423 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3424 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3425 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv); in TestConv()
3427 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang); in TestConv()
3428 TestToAndFromUChars(in,(const UChar*)&in[len],cnv); in TestConv()
3434 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3451 ucnv_close(cnv); in TestConv()
3859 UConverter *cnv; in TestISO_2022_JP_1() local
3861 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP_1()
3875 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode); in TestISO_2022_JP_1()
3883 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode); in TestISO_2022_JP_1()
3900 ucnv_reset(cnv); in TestISO_2022_JP_1()
3903 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_1()
3905 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_1()
3906 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_1()
3907 ucnv_close(cnv); in TestISO_2022_JP_1()
3948 UConverter *cnv; in TestISO_2022_JP_2() local
3951 cnv=ucnv_open("ISO_2022_JP_2", &errorCode); in TestISO_2022_JP_2()
3965 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP_2()
3974 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP_2()
3988 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3989 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3990 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3992 ucnv_reset(cnv); in TestISO_2022_JP_2()
3995 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_2()
3997 ucnv_close(cnv); in TestISO_2022_JP_2()
4025 UConverter *cnv; in TestISO_2022_KR() local
4028 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode); in TestISO_2022_KR()
4042 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR()
4051 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR()
4064 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR()
4065 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4066 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4067 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4070 ucnv_reset(cnv); in TestISO_2022_KR()
4073 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR()
4074 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR()
4076 ucnv_close(cnv); in TestISO_2022_KR()
4104 UConverter *cnv; in TestISO_2022_KR_1() local
4107 cnv=ucnv_open("ibm-25546", &errorCode); in TestISO_2022_KR_1()
4121 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR_1()
4130 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR_1()
4143 ucnv_reset(cnv); in TestISO_2022_KR_1()
4144 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR_1()
4145 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4146 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4147 ucnv_reset(cnv); in TestISO_2022_KR_1()
4148 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4150 ucnv_reset(cnv); in TestISO_2022_KR_1()
4153 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR_1()
4154 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR_1()
4156 ucnv_close(cnv); in TestISO_2022_KR_1()
4410 UConverter *cnv;
4413 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4427 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4436 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4452 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4453 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4455 ucnv_reset(cnv);
4458 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, …
4460 ucnv_close(cnv);
4509 UConverter *cnv; in TestISO_2022_CN() local
4512 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode); in TestISO_2022_CN()
4526 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_CN()
4535 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_CN()
4551 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding"); in TestISO_2022_CN()
4552 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4553 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4554 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4557 ucnv_reset(cnv); in TestISO_2022_CN()
4560 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_CN()
4563 ucnv_close(cnv); in TestISO_2022_CN()
4610 UConverter * cnv = ucnv_open(testPtr->converterName, &err); in TestJitterbug6175() local
4615 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err); in TestJitterbug6175()
4618 ucnv_close(cnv); in TestJitterbug6175()
4627 … ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err); in TestJitterbug6175()
4629 ucnv_close(cnv); in TestJitterbug6175()
4671 UConverter *cnv=ucnv_open("ibm-930", &errorCode); in TestEBCDIC_STATEFUL() local
4676 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)"); in TestEBCDIC_STATEFUL()
4677 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4679 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestEBCDIC_STATEFUL()
4680 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4684 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFB… in TestEBCDIC_STATEFUL()
4687 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4690 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestEBCDIC_STATEFUL()
4692 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4695 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2"); in TestEBCDIC_STATEFUL()
4696 ucnv_close(cnv); in TestEBCDIC_STATEFUL()
4747 UConverter *cnv=ucnv_open("gb18030", &errorCode); in TestGB18030() local
4752 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030"); in TestGB18030()
4753 ucnv_close(cnv); in TestGB18030()
4837 UConverter *cnv; in TestLMBCS() local
4929 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */ in TestLMBCS()
4937 ucnv_toUnicode (cnv, in TestLMBCS()
4955 ucnv_close(cnv); in TestLMBCS()
4968 cnv=ucnv_open("LMBCS-1", &errorCode); in TestLMBCS()
4978 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode); in TestLMBCS()
4991 ucnv_close(cnv); in TestLMBCS()
5091 cnv = ucnv_open(NAME_LMBCS_1, &errorCode); in TestLMBCS()
5100 ucnv_toUnicode (cnv, in TestLMBCS()
5150 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode); in TestLMBCS()
5158 …ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCo… in TestLMBCS()
5165 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode); in TestLMBCS()
5173 … ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode); in TestLMBCS()
5174 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode); in TestLMBCS()
5183 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode); in TestLMBCS()
5197 …ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALS… in TestLMBCS()
5206 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode); in TestLMBCS()
5224 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestLMBCS()
5225 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5239 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5256 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5273 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5290 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5306 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5314 ucnv_close(cnv); /* final cleanup */ in TestLMBCS()
5325 UConverter *cnv = 0; in TestJitterbug255() local
5327 cnv = ucnv_open("shift-jis", &status); in TestJitterbug255()
5328 if (U_FAILURE(status) || cnv == 0) { in TestJitterbug255()
5334 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status); in TestJitterbug255()
5341 ucnv_close(cnv); in TestJitterbug255()
5356 UConverter *cnv = 0; in TestEBCDICUS4XML() local
5358 cnv = ucnv_open("ebcdic-xml-us", &status); in TestEBCDICUS4XML()
5359 if (U_FAILURE(status) || cnv == 0) { in TestEBCDICUS4XML()
5363 …ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &statu… in TestEBCDICUS4XML()
5371 …ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRU… in TestEBCDICUS4XML()
5378 ucnv_close(cnv); in TestEBCDICUS4XML()
5567 UConverter *cnv = NULL; in TestIsFixedWidth() local
5584 cnv = ucnv_open(fixedWidth[i], &status); in TestIsFixedWidth()
5585 if (cnv == NULL || U_FAILURE(status)) { in TestIsFixedWidth()
5590 if (!ucnv_isFixedWidth(cnv, &status)) { in TestIsFixedWidth()
5593 ucnv_close(cnv); in TestIsFixedWidth()
5597 cnv = ucnv_open(notFixedWidth[i], &status); in TestIsFixedWidth()
5598 if (cnv == NULL || U_FAILURE(status)) { in TestIsFixedWidth()
5603 if (ucnv_isFixedWidth(cnv, &status)) { in TestIsFixedWidth()
5606 ucnv_close(cnv); in TestIsFixedWidth()