Lines Matching refs:cnv
29 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t res…
30 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode e…
118 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
129 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err) in my_ucnv_open() argument
131 if(cnv && cnv[0] == '@') { in my_ucnv_open()
132 return ucnv_openPackage(loadTestData(err), cnv+1, err); in my_ucnv_open()
134 return ucnv_open(cnv, err); in my_ucnv_open()
174 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], cons… in TestNextUChar() argument
184 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUChar()
204 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, con… in TestNextUCharError() argument
209 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUCharError()
1457 TestAmbiguousConverter(UConverter *cnv) { in TestAmbiguousConverter() argument
1470 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode); in TestAmbiguousConverter()
1483 isAmbiguous=ucnv_isAmbiguous(cnv); in TestAmbiguousConverter()
1488 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous); in TestAmbiguousConverter()
1494 ucnv_fixFileSeparator(cnv, outUnicode, (int32_t)(u-outUnicode)); in TestAmbiguousConverter()
1497 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode)); in TestAmbiguousConverter()
1506 UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv; in TestAmbiguous() local
1523 cnv=ucnv_open(name, &status); in TestAmbiguous()
1526 const char* cnvName = ucnv_getName(cnv, &status); in TestAmbiguous()
1529 TestAmbiguousConverter(cnv); in TestAmbiguous()
1532 ucnv_close(cnv); in TestAmbiguous()
1834 UConverter *cnv=ucnv_open("UTF-7", &errorCode); in TestUTF7() local
1839 TestNextUChar(cnv, source, limit, results, "UTF-7"); in TestUTF7()
1841 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF7()
1842 cnvName = ucnv_getName(cnv, &errorCode); in TestUTF7()
1846 ucnv_close(cnv); in TestUTF7()
1877 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode); in TestIMAP() local
1882 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name"); in TestIMAP()
1884 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestIMAP()
1885 cnvName = ucnv_getName(cnv, &errorCode); in TestIMAP()
1889 ucnv_close(cnv); in TestIMAP()
1939 UConverter *cnv=ucnv_open("UTF-8", &errorCode); in TestUTF8() local
1944 TestNextUChar(cnv, source, limit, results, "UTF-8"); in TestUTF8()
1946 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF8()
1949 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF8()
1952 TestNextUChar(cnv, source, limit, results2, "UTF-8"); in TestUTF8()
1954 ucnv_close(cnv); in TestUTF8()
2010 UConverter *cnv=ucnv_open("CESU-8", &errorCode); in TestCESU8() local
2015 TestNextUChar(cnv, source, limit, results, "CESU-8"); in TestCESU8()
2017 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestCESU8()
2020 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestCESU8()
2023 TestNextUChar(cnv, source, limit, results2, "CESU-8"); in TestCESU8()
2025 ucnv_close(cnv); in TestCESU8()
2062 UConverter *cnv=ucnv_open("UTF-16", &errorCode); in TestUTF16() local
2069 TestNextUChar(cnv, source, limit, results1, "UTF-16"); in TestUTF16()
2072 ucnv_resetToUnicode(cnv); in TestUTF16()
2073 TestNextUChar(cnv, source, limit, results2, "UTF-16"); in TestUTF16()
2076 ucnv_resetToUnicode(cnv); in TestUTF16()
2077 TestNextUChar(cnv, source, limit, results3, "UTF-16"); in TestUTF16()
2080 ucnv_resetToUnicode(cnv); in TestUTF16()
2081 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16()
2083 ucnv_close(cnv); in TestUTF16()
2110 UConverter *cnv=ucnv_open("utf-16be", &errorCode); in TestUTF16BE() local
2115 TestNextUChar(cnv, source, limit, results, "UTF-16BE"); in TestUTF16BE()
2117 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16BE()
2121 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16BE()
2122 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2135 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2138 ucnv_close(cnv); in TestUTF16BE()
2164 UConverter *cnv=ucnv_open("utf-16le", &errorCode); in TestUTF16LE() local
2169 TestNextUChar(cnv, source, limit, results, "UTF-16LE"); in TestUTF16LE()
2171 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16LE()
2175 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16LE()
2176 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2189 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2193 ucnv_close(cnv); in TestUTF16LE()
2230 UConverter *cnv=ucnv_open("UTF-32", &errorCode); in TestUTF32() local
2237 TestNextUChar(cnv, source, limit, results1, "UTF-32"); in TestUTF32()
2240 ucnv_resetToUnicode(cnv); in TestUTF32()
2241 TestNextUChar(cnv, source, limit, results2, "UTF-32"); in TestUTF32()
2244 ucnv_resetToUnicode(cnv); in TestUTF32()
2245 TestNextUChar(cnv, source, limit, results3, "UTF-32"); in TestUTF32()
2248 ucnv_resetToUnicode(cnv); in TestUTF32()
2249 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32()
2251 ucnv_close(cnv); in TestUTF32()
2306 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode); in TestUTF32BE() local
2311 TestNextUChar(cnv, source, limit, results, "UTF-32BE"); in TestUTF32BE()
2314 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32BE()
2317 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32BE()
2320 TestNextUChar(cnv, source, limit, results2, "UTF-32BE"); in TestUTF32BE()
2322 ucnv_close(cnv); in TestUTF32BE()
2377 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode); in TestUTF32LE() local
2382 TestNextUChar(cnv, source, limit, results, "UTF-32LE"); in TestUTF32LE()
2385 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32LE()
2388 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32LE()
2391 TestNextUChar(cnv, source, limit, results2, "UTF-32LE"); in TestUTF32LE()
2393 ucnv_close(cnv); in TestUTF32LE()
2510 UConverter *cnv=ucnv_open("LATIN_1", &errorCode); in TestLATIN1() local
2515 TestNextUChar(cnv, source, limit, results, "LATIN_1"); in TestLATIN1()
2517 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestLATIN1()
2521 ucnv_close(cnv); in TestLATIN1()
2541 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode); in TestSBCS() local
2546 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)"); in TestSBCS()
2548 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestSBCS()
2556 ucnv_close(cnv); in TestSBCS()
2584 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode); in TestDBCS() local
2589 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)"); in TestDBCS()
2591 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestDBCS()
2595 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestDBCS()
2600 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestDBCS()
2601 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestDBCS()
2603 ucnv_close(cnv); in TestDBCS()
2635 UConverter *cnv=ucnv_open("ibm-1363", &errorCode); in TestMBCS() local
2640 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)"); in TestMBCS()
2642 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestMBCS()
2646 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestMBCS()
2651 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestMBCS()
2652 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestMBCS()
2654 ucnv_close(cnv); in TestMBCS()
2670 UConverter *cnv=ucnv_open(cnvName, &status); in TestICCRunout() local
2681 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status); in TestICCRunout()
2694 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2697 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2700 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2709 ucnv_close(cnv); in TestICCRunout()
2744 UConverter *cnv; in TestISO_2022() local
2746 cnv=ucnv_open("ISO_2022", &errorCode); in TestISO_2022()
2751 TestNextUChar(cnv, source, limit, results, "ISO_2022"); in TestISO_2022()
2754 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source"); in TestISO_2022()
2755 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestISO_2022()
2759 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022()
2760 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestISO_2022()
2765 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR… in TestISO_2022()
2767 ucnv_close(cnv); in TestISO_2022()
2773 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallTargetBuffer() argument
2790 ucnv_reset(cnv); in TestSmallTargetBuffer()
2803 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallTargetBuffer()
2819 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallTargetBuffer()
2842 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestToAndFromUChars() argument
2863 ucnv_reset(cnv); in TestToAndFromUChars()
2864 …numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)… in TestToAndFromUChars()
2871 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode); in TestToAndFromUChars()
2889 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallSourceBuffer() argument
2908 ucnv_reset(cnv); in TestSmallSourceBuffer()
2923 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallSourceBuffer()
2941 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallSourceBuffer()
2964 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit, in TestGetNextUChar2022() argument
2971 ucnv_reset(cnv); in TestGetNextUChar2022()
2974 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestGetNextUChar2022()
3095 UConverter *cnv; in TestHZ() local
3098 cnv=ucnv_open("HZ", &errorCode); in TestHZ()
3112 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestHZ()
3121 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestHZ()
3135 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding"); in TestHZ()
3136 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3137 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3138 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3140 ucnv_close(cnv); in TestHZ()
3314 UConverter *cnv; in TestISO_2022_JP() local
3317 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP()
3331 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP()
3340 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP()
3356 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3357 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3358 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding"); in TestISO_2022_JP()
3359 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3361 ucnv_close(cnv); in TestISO_2022_JP()
3380 UConverter *cnv; in TestConv() local
3383 cnv=my_ucnv_open(conv, &errorCode); in TestConv()
3397 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestConv()
3407 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3421 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3422 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3423 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv); in TestConv()
3425 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang); in TestConv()
3426 TestToAndFromUChars(in,(const UChar*)&in[len],cnv); in TestConv()
3432 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3449 ucnv_close(cnv); in TestConv()
3857 UConverter *cnv; in TestISO_2022_JP_1() local
3859 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP_1()
3873 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode); in TestISO_2022_JP_1()
3881 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode); in TestISO_2022_JP_1()
3898 ucnv_reset(cnv); in TestISO_2022_JP_1()
3901 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_1()
3903 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_1()
3904 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_1()
3905 ucnv_close(cnv); in TestISO_2022_JP_1()
3946 UConverter *cnv; in TestISO_2022_JP_2() local
3949 cnv=ucnv_open("ISO_2022_JP_2", &errorCode); in TestISO_2022_JP_2()
3963 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP_2()
3972 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP_2()
3986 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3987 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3988 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3990 ucnv_reset(cnv); in TestISO_2022_JP_2()
3993 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_2()
3995 ucnv_close(cnv); in TestISO_2022_JP_2()
4023 UConverter *cnv; in TestISO_2022_KR() local
4026 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode); in TestISO_2022_KR()
4040 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR()
4049 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR()
4062 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR()
4063 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4064 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4065 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4068 ucnv_reset(cnv); in TestISO_2022_KR()
4071 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR()
4072 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR()
4074 ucnv_close(cnv); in TestISO_2022_KR()
4102 UConverter *cnv; in TestISO_2022_KR_1() local
4105 cnv=ucnv_open("ibm-25546", &errorCode); in TestISO_2022_KR_1()
4119 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR_1()
4128 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR_1()
4141 ucnv_reset(cnv); in TestISO_2022_KR_1()
4142 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR_1()
4143 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4144 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4145 ucnv_reset(cnv); in TestISO_2022_KR_1()
4146 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4148 ucnv_reset(cnv); in TestISO_2022_KR_1()
4151 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR_1()
4152 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR_1()
4154 ucnv_close(cnv); in TestISO_2022_KR_1()
4408 UConverter *cnv;
4411 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4425 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4434 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4450 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4451 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4453 ucnv_reset(cnv);
4456 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, …
4458 ucnv_close(cnv);
4507 UConverter *cnv; in TestISO_2022_CN() local
4510 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode); in TestISO_2022_CN()
4524 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_CN()
4533 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_CN()
4549 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding"); in TestISO_2022_CN()
4550 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4551 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4552 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4555 ucnv_reset(cnv); in TestISO_2022_CN()
4558 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_CN()
4561 ucnv_close(cnv); in TestISO_2022_CN()
4608 UConverter * cnv = ucnv_open(testPtr->converterName, &err); in TestJitterbug6175() local
4613 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err); in TestJitterbug6175()
4616 ucnv_close(cnv); in TestJitterbug6175()
4625 … ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err); in TestJitterbug6175()
4627 ucnv_close(cnv); in TestJitterbug6175()
4669 UConverter *cnv=ucnv_open("ibm-930", &errorCode); in TestEBCDIC_STATEFUL() local
4674 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)"); in TestEBCDIC_STATEFUL()
4675 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4677 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestEBCDIC_STATEFUL()
4678 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4682 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFB… in TestEBCDIC_STATEFUL()
4685 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4688 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestEBCDIC_STATEFUL()
4690 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4693 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2"); in TestEBCDIC_STATEFUL()
4694 ucnv_close(cnv); in TestEBCDIC_STATEFUL()
4745 UConverter *cnv=ucnv_open("gb18030", &errorCode); in TestGB18030() local
4750 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030"); in TestGB18030()
4751 ucnv_close(cnv); in TestGB18030()
4835 UConverter *cnv; in TestLMBCS() local
4927 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */ in TestLMBCS()
4935 ucnv_toUnicode (cnv, in TestLMBCS()
4953 ucnv_close(cnv); in TestLMBCS()
4966 cnv=ucnv_open("LMBCS-1", &errorCode); in TestLMBCS()
4976 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode); in TestLMBCS()
4989 ucnv_close(cnv); in TestLMBCS()
5089 cnv = ucnv_open(NAME_LMBCS_1, &errorCode); in TestLMBCS()
5098 ucnv_toUnicode (cnv, in TestLMBCS()
5148 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode); in TestLMBCS()
5156 …ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCo… in TestLMBCS()
5163 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode); in TestLMBCS()
5171 … ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode); in TestLMBCS()
5172 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode); in TestLMBCS()
5181 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode); in TestLMBCS()
5195 …ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALS… in TestLMBCS()
5204 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode); in TestLMBCS()
5222 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestLMBCS()
5223 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5237 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5254 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5271 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5288 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5304 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5312 ucnv_close(cnv); /* final cleanup */ in TestLMBCS()
5323 UConverter *cnv = 0; in TestJitterbug255() local
5325 cnv = ucnv_open("shift-jis", &status); in TestJitterbug255()
5326 if (U_FAILURE(status) || cnv == 0) { in TestJitterbug255()
5332 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status); in TestJitterbug255()
5339 ucnv_close(cnv); in TestJitterbug255()
5354 UConverter *cnv = 0; in TestEBCDICUS4XML() local
5356 cnv = ucnv_open("ebcdic-xml-us", &status); in TestEBCDICUS4XML()
5357 if (U_FAILURE(status) || cnv == 0) { in TestEBCDICUS4XML()
5361 …ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &statu… in TestEBCDICUS4XML()
5369 …ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRU… in TestEBCDICUS4XML()
5376 ucnv_close(cnv); in TestEBCDICUS4XML()
5565 UConverter *cnv = NULL; in TestIsFixedWidth() local
5582 cnv = ucnv_open(fixedWidth[i], &status); in TestIsFixedWidth()
5583 if (cnv == NULL || U_FAILURE(status)) { in TestIsFixedWidth()
5588 if (!ucnv_isFixedWidth(cnv, &status)) { in TestIsFixedWidth()
5591 ucnv_close(cnv); in TestIsFixedWidth()
5595 cnv = ucnv_open(notFixedWidth[i], &status); in TestIsFixedWidth()
5596 if (cnv == NULL || U_FAILURE(status)) { in TestIsFixedWidth()
5601 if (ucnv_isFixedWidth(cnv, &status)) { in TestIsFixedWidth()
5604 ucnv_close(cnv); in TestIsFixedWidth()