Home | History | Annotate | Download | only in cintltst

Lines Matching refs:cnv

28 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
29 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
113 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
124 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err)
126 if(cnv && cnv[0] == '@') {
127 return ucnv_openPackage(loadTestData(err), cnv+1, err);
129 return ucnv_open(cnv, err);
169 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message)
179 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
199 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message)
204 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
1471 TestAmbiguousConverter(UConverter *cnv) {
1484 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode);
1497 isAmbiguous=ucnv_isAmbiguous(cnv);
1502 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous);
1508 ucnv_fixFileSeparator(cnv, outUnicode, (int32_t)(u-outUnicode));
1511 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode));
1520 UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv;
1537 cnv=ucnv_open(name, &status);
1542 const char* cnvName = ucnv_getName(cnv, &status);
1545 TestAmbiguousConverter(cnv);
1548 ucnv_close(cnv);
1850 UConverter *cnv=ucnv_open("UTF-7", &errorCode);
1855 TestNextUChar(cnv, source, limit, results, "UTF-7");
1857 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1858 cnvName = ucnv_getName(cnv, &errorCode);
1862 ucnv_close(cnv);
1893 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode);
1898 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name");
1900 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1901 cnvName = ucnv_getName(cnv, &errorCode);
1905 ucnv_close(cnv);
1955 UConverter *cnv=ucnv_open("UTF-8", &errorCode);
1960 TestNextUChar(cnv, source, limit, results, "UTF-8");
1962 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1965 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
1968 TestNextUChar(cnv, source, limit, results2, "UTF-8");
1970 ucnv_close(cnv);
2026 UConverter *cnv=ucnv_open("CESU-8", &errorCode);
2031 TestNextUChar(cnv, source, limit, results, "CESU-8");
2033 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2036 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2039 TestNextUChar(cnv, source, limit, results2, "CESU-8");
2041 ucnv_close(cnv);
2078 UConverter *cnv=ucnv_open("UTF-16", &errorCode);
2085 TestNextUChar(cnv, source, limit, results1, "UTF-16");
2088 ucnv_resetToUnicode(cnv);
2089 TestNextUChar(cnv, source, limit, results2, "UTF-16");
2092 ucnv_resetToUnicode(cnv);
2093 TestNextUChar(cnv, source, limit, results3, "UTF-16");
2096 ucnv_resetToUnicode(cnv);
2097 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2099 ucnv_close(cnv);
2126 UConverter *cnv=ucnv_open("utf-16be", &errorCode);
2131 TestNextUChar(cnv, source, limit, results, "UTF-16BE");
2133 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2137 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2138 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
2151 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
2154 ucnv_close(cnv);
2180 UConverter *cnv=ucnv_open("utf-16le", &errorCode);
2185 TestNextUChar(cnv, source, limit, results, "UTF-16LE");
2187 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2191 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2192 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
2205 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
2209 ucnv_close(cnv);
2246 UConverter *cnv=ucnv_open("UTF-32", &errorCode);
2253 TestNextUChar(cnv, source, limit, results1, "UTF-32");
2256 ucnv_resetToUnicode(cnv);
2257 TestNextUChar(cnv, source, limit, results2, "UTF-32");
2260 ucnv_resetToUnicode(cnv);
2261 TestNextUChar(cnv, source, limit, results3, "UTF-32");
2264 ucnv_resetToUnicode(cnv);
2265 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2267 ucnv_close(cnv);
2322 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode);
2327 TestNextUChar(cnv, source, limit, results, "UTF-32BE");
2330 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2333 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2336 TestNextUChar(cnv, source, limit, results2, "UTF-32BE");
2338 ucnv_close(cnv);
2393 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode);
2398 TestNextUChar(cnv, source, limit, results, "UTF-32LE");
2401 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2404 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2407 TestNextUChar(cnv, source, limit, results2, "UTF-32LE");
2409 ucnv_close(cnv);
2526 UConverter *cnv=ucnv_open("LATIN_1", &errorCode);
2531 TestNextUChar(cnv, source, limit, results, "LATIN_1");
2533 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2537 ucnv_close(cnv);
2557 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode);
2562 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)");
2564 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2569 TestNextUCharError(cnv, illegalsource, illegalsource+sizeof(illegalsource), U_INVALID_CHAR_FOUND, "source has a illegal characte");
2572 ucnv_close(cnv);
2600 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode);
2605 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)");
2607 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2611 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
2616 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2617 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2619 ucnv_close(cnv);
2651 UConverter *cnv=ucnv_open("ibm-1363", &errorCode);
2656 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)");
2658 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2662 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
2667 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2668 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2670 ucnv_close(cnv);
2686 UConverter *cnv=ucnv_open(cnvName, &status);
2697 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status);
2710 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2713 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2716 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2725 ucnv_close(cnv);
2760 UConverter *cnv;
2762 cnv=ucnv_open("ISO_2022", &errorCode);
2767 TestNextUChar(cnv, source, limit, results, "ISO_2022");
2770 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source");
2771 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2775 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2776 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2781 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR_FOUND, "an invalid character");
2783 ucnv_close(cnv);
2789 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2806 ucnv_reset(cnv);
2819 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2835 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2858 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2879 ucnv_reset(cnv);
2880 numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)(uSourceLimit-uSource), &errorCode);
2887 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode);
2905 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2924 ucnv_reset(cnv);
2939 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2957 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2980 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit,
2987 ucnv_reset(cnv);
2990 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
3111 UConverter *cnv;
3114 cnv=ucnv_open("HZ", &errorCode);
3128 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3137 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3151 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding");
3152 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3153 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3154 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3156 ucnv_close(cnv);
3330 UConverter *cnv;
3333 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3347 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3356 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3372 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3373 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3374 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding");
3375 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3377 ucnv_close(cnv);
3396 UConverter *cnv;
3399 cnv=my_ucnv_open(conv, &errorCode);
3413 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3423 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3437 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv);
3438 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv);
3439 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv);
3441 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang);
3442 TestToAndFromUChars(in,(const UChar*)&in[len],cnv);
3448 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3465 ucnv_close(cnv);
3766 /* UConverter* cnv = ucnv_open("SCSU",&status); */
3862 UConverter *cnv;
3864 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3878 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode);
3886 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode);
3900 /*ucnv_close(cnv);
3901 cnv=ucnv_open("ISO_2022,locale=jp,version=1", &errorCode);*/
3903 ucnv_reset(cnv);
3906 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-1]");
3908 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3909 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3910 ucnv_close(cnv);
3951 UConverter *cnv;
3954 cnv=ucnv_open("ISO_2022_JP_2", &errorCode);
3968 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3977 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3991 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3992 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3993 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3995 ucnv_reset(cnv);
3998 TestNextUCharError(cnv
4000 ucnv_close(cnv);
4028 UConverter *cnv;
4031 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode);
4045 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4054 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4067 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
4068 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4069 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4070 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4073 ucnv_reset(cnv);
4076 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4077 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
4079 ucnv_close(cnv);
4107 UConverter *cnv;
4110 cnv=ucnv_open("ibm-25546", &errorCode);
4124 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4133 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4146 ucnv_reset(cnv);
4147 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
4148 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4149 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4150 ucnv_reset(cnv);
4151 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4153 ucnv_reset(cnv);
4156 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4157 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
4159 ucnv_close(cnv);
4413 UConverter *cnv;
4416 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4430 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4439 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4455 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4456 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4458 ucnv_reset(cnv);
4461 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN-EXT]");
4463 ucnv_close(cnv);
4512 UConverter *cnv;
4515 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode);
4529 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4538 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4554 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding");
4555 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4556 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4557 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4560 ucnv_reset(cnv);
4563 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN]");
4566 ucnv_close(cnv);
4613 UConverter * cnv = ucnv_open(testPtr->converterName, &err);
4618 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err);
4621 ucnv_close(cnv);
4630 ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err);
4632 ucnv_close(cnv);
4674 UConverter *cnv=ucnv_open("ibm-930", &errorCode);
4679 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)");
4680 ucnv_reset(cnv);
4682 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
4683 ucnv_reset(cnv);
4687 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFBOUNDS_ERROR, "a character is truncated");
4690 ucnv_reset(cnv);
4693 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [EBCDIC STATEFUL]");
4695 ucnv_reset(cnv);
4698 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2");
4699 ucnv_close(cnv);
4750 UConverter *cnv=ucnv_open("gb18030", &errorCode);
4755 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030");
4756 ucnv_close(cnv);
4840 UConverter *cnv;
4932 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */
4940 ucnv_toUnicode (cnv,
4958 ucnv_close(cnv);
4971 cnv=ucnv_open("LMBCS-1", &errorCode);
4981 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
4994 ucnv_close(cnv);
5094 cnv = ucnv_open(NAME_LMBCS_1, &errorCode);
5103 ucnv_toUnicode (cnv,
5153 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode);
5161 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCode);
5168 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode);
5176 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode);
5177 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode);
5186 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode);
5200 ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALSE, &errorCode);
5209 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode);
5227 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
5228 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5242 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+3),off,TRUE, &errorCode);
5259 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+6),off,TRUE, &errorCode);
5276 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5293 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5309 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+4),off,TRUE, &errorCode);
5317 ucnv_close(cnv); /* final cleanup */
5328 UConverter *cnv = 0;
5330 cnv = ucnv_open("shift-jis", &status);
5331 if (U_FAILURE(status) || cnv == 0) {
5337 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status);
5344 ucnv_close(cnv);
5359 UConverter *cnv = 0;
5361 cnv = ucnv_open("ebcdic-xml-us", &status);
5362 if (U_FAILURE(status) || cnv == 0) {
5366 ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &status);
5374 ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRUE, &status);
5381 ucnv_close(cnv);