Lines Matching defs:cnv

32 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
33 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
121 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
132 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err)
134 if(cnv && cnv[0] == '@') {
135 return ucnv_openPackage(loadTestData(err), cnv+1, err);
137 return ucnv_open(cnv, err);
177 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message)
187 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
207 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message)
212 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);
1539 TestAmbiguousConverter(cnv);
1540 ucnv_close(cnv);
1842 UConverter *cnv=ucnv_open("UTF-7", &errorCode);
1847 TestNextUChar(cnv, source, limit, results, "UTF-7");
1849 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1850 cnvName = ucnv_getName(cnv, &errorCode);
1854 ucnv_close(cnv);
1885 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode);
1890 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name");
1892 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1893 cnvName = ucnv_getName(cnv, &errorCode);
1897 ucnv_close(cnv);
1947 UConverter *cnv=ucnv_open("UTF-8", &errorCode);
1952 TestNextUChar(cnv, source, limit, results, "UTF-8");
1954 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1957 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
1960 TestNextUChar(cnv, source, limit, results2, "UTF-8");
1962 ucnv_close(cnv);
2018 UConverter *cnv=ucnv_open("CESU-8", &errorCode);
2023 TestNextUChar(cnv, source, limit, results, "CESU-8");
2025 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2028 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2031 TestNextUChar(cnv, source, limit, results2, "CESU-8");
2033 ucnv_close(cnv);
2070 UConverter *cnv=ucnv_open("UTF-16", &errorCode);
2077 TestNextUChar(cnv, source, limit, results1, "UTF-16");
2080 ucnv_resetToUnicode(cnv);
2081 TestNextUChar(cnv, source, limit, results2, "UTF-16");
2084 ucnv_resetToUnicode(cnv);
2085 TestNextUChar(cnv, source, limit, results3, "UTF-16");
2088 ucnv_resetToUnicode(cnv);
2089 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2091 ucnv_close(cnv);
2118 UConverter *cnv=ucnv_open("utf-16be", &errorCode);
2123 TestNextUChar(cnv, source, limit, results, "UTF-16BE");
2125 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2129 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2130 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
2143 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
2146 ucnv_close(cnv);
2172 UConverter *cnv=ucnv_open("utf-16le", &errorCode);
2177 TestNextUChar(cnv, source, limit, results, "UTF-16LE");
2179 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2183 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2184 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
2197 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
2201 ucnv_close(cnv);
2238 UConverter *cnv=ucnv_open("UTF-32", &errorCode);
2245 TestNextUChar(cnv, source, limit, results1, "UTF-32");
2248 ucnv_resetToUnicode(cnv);
2249 TestNextUChar(cnv, source, limit, results2, "UTF-32");
2252 ucnv_resetToUnicode(cnv);
2253 TestNextUChar(cnv, source, limit, results3, "UTF-32");
2256 ucnv_resetToUnicode(cnv);
2257 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2259 ucnv_close(cnv);
2314 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode);
2319 TestNextUChar(cnv, source, limit, results, "UTF-32BE");
2322 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2325 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2328 TestNextUChar(cnv, source, limit, results2, "UTF-32BE");
2330 ucnv_close(cnv);
2385 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode);
2390 TestNextUChar(cnv, source, limit, results, "UTF-32LE");
2393 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2396 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2399 TestNextUChar(cnv, source, limit, results2, "UTF-32LE");
2401 ucnv_close(cnv);
2518 UConverter *cnv=ucnv_open("LATIN_1", &errorCode);
2523 TestNextUChar(cnv, source, limit, results, "LATIN_1");
2525 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2529 ucnv_close(cnv);
2549 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode);
2554 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)");
2556 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2561 TestNextUCharError(cnv, illegalsource, illegalsource+sizeof(illegalsource), U_INVALID_CHAR_FOUND, "source has a illegal character");
2564 ucnv_close(cnv);
2592 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode);
2597 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)");
2599 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2603 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
2608 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2609 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2611 ucnv_close(cnv);
2643 UConverter *cnv=ucnv_open("ibm-1363", &errorCode);
2648 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)");
2650 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2654 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
2659 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2660 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2662 ucnv_close(cnv);
2678 UConverter *cnv=ucnv_open(cnvName, &status);
2689 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, true, &status);
2702 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2705 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2708 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2717 ucnv_close(cnv);
2752 UConverter *cnv;
2754 cnv=ucnv_open("ISO_2022", &errorCode);
2759 TestNextUChar(cnv, source, limit, results, "ISO_2022");
2762 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source");
2763 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2767 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2768 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2773 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR_FOUND, "an invalid character");
2775 ucnv_close(cnv);
2781 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2798 ucnv_reset(cnv);
2811 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,false, &errorCode);
2827 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,false,&errorCode);
2850 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2871 ucnv_reset(cnv);
2872 numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)(uSourceLimit-uSource), &errorCode);
2879 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode);
2897 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2916 ucnv_reset(cnv);
2931 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,false, &errorCode);
2949 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,false,&errorCode);
2972 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit,
2979 ucnv_reset(cnv);
2982 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
3104 UConverter *cnv = NULL;
3107 cnv=ucnv_open("HZ", &errorCode);
3121 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
3130 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
3144 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding");
3145 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3146 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3147 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3151 ucnv_close(cnv);
3326 UConverter *cnv = NULL;
3329 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3343 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
3352 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
3368 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3369 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3370 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding");
3371 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3375 ucnv_close(cnv);
3394 UConverter *cnv;
3397 cnv=my_ucnv_open(conv, &errorCode);
3411 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
3421 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
3435 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv);
3436 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv);
3437 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv);
3439 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang);
3440 TestToAndFromUChars(in,(const UChar*)&in[len],cnv);
3446 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
3463 ucnv_close(cnv);
3775 /* UConverter* cnv = ucnv_open("SCSU",&status); */
3871 UConverter *cnv;
3873 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3887 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,true, &errorCode);
3895 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,true,&errorCode);
3909 /*ucnv_close(cnv);
3910 cnv=ucnv_open("ISO_2022,locale=jp,version=1", &errorCode);*/
3912 ucnv_reset(cnv);
3915 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-1]");
3917 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3918 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
3919 ucnv_close(cnv);
3961 UConverter *cnv = NULL;
3964 cnv=ucnv_open("ISO_2022_JP_2", &errorCode);
3978 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
3987 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
4001 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4002 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4003 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4005 ucnv_reset(cnv);
4008 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-2]");
4012 ucnv_close(cnv);
4041 UConverter *cnv = NULL;
4044 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode);
4058 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
4067 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
4080 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
4081 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4082 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4083 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4086 ucnv_reset(cnv);
4089 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4090 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
4094 ucnv_close(cnv);
4123 UConverter *cnv = NULL;
4126 cnv=ucnv_open("ibm-25546", &errorCode);
4140 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
4149 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
4162 ucnv_reset(cnv);
4163 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
4164 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4165 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4166 ucnv_reset(cnv);
4167 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4169 ucnv_reset(cnv);
4172 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4173 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
4177 ucnv_close(cnv);
4432 UConverter *cnv = NULL;
4435 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4449 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
4458 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
4474 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4475 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4477 ucnv_reset(cnv);
4480 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN-EXT]");
4484 ucnv_close(cnv);
4534 UConverter *cnv = NULL;
4537 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode);
4551 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,true, &errorCode);
4560 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,true,&errorCode);
4576 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding");
4577 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4578 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4579 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4582 ucnv_reset(cnv);
4585 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN]");
4589 ucnv_close(cnv);
4640 UConverter * cnv = ucnv_open(testPtr->converterName, &err);
4645 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err);
4648 ucnv_close(cnv);
4657 ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, true, &err);
4659 ucnv_close(cnv);
4701 UConverter *cnv=ucnv_open("ibm-930", &errorCode);
4706 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)");
4707 ucnv_reset(cnv);
4709 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
4710 ucnv_reset(cnv);
4714 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFBOUNDS_ERROR, "a character is truncated");
4717 ucnv_reset(cnv);
4720 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [EBCDIC STATEFUL]");
4722 ucnv_reset(cnv);
4725 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2");
4726 ucnv_close(cnv);
4777 UConverter *cnv=ucnv_open("gb18030", &errorCode);
4782 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030");
4783 ucnv_close(cnv);
4867 UConverter *cnv;
4959 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */
4967 ucnv_toUnicode (cnv,
4985 ucnv_close(cnv);
4998 cnv=ucnv_open("LMBCS-1", &errorCode);
5008 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
5021 ucnv_close(cnv);
5121 cnv = ucnv_open(NAME_LMBCS_1, &errorCode);
5130 ucnv_toUnicode (cnv,
5180 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, false, &errorCode);
5188 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,false, &errorCode);
5195 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode);
5203 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,false, &errorCode);
5204 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,false, &errorCode);
5213 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode);
5227 ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+UPRV_LENGTHOF(pszUnicode),off,false, &errorCode);
5236 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,false, &errorCode);
5254 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
5255 ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,true, &errorCode);
5269 ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+3),off,true, &errorCode);
5286 ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+6),off,true, &errorCode);
5303 ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,true, &errorCode);
5320 ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,true, &errorCode);
5336 ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+4),off,true, &errorCode);
5344 ucnv_close(cnv); /* final cleanup */
5355 UConverter *cnv = 0;
5357 cnv = ucnv_open("shift-jis", &status);
5358 if (U_FAILURE(status) || cnv == 0) {
5364 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status);
5371 ucnv_close(cnv);
5386 UConverter *cnv = 0;
5388 cnv = ucnv_open("ebcdic-xml-us", &status);
5389 if (U_FAILURE(status) || cnv == 0) {
5393 ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, true, &status);
5401 ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, true, &status);
5408 ucnv_close(cnv);
5597 UConverter *cnv = NULL;
5614 cnv = ucnv_open(fixedWidth[i], &status);
5615 if (cnv == NULL || U_FAILURE(status)) {
5620 if (!ucnv_isFixedWidth(cnv, &status)) {
5623 ucnv_close(cnv);
5627 cnv = ucnv_open(notFixedWidth[i], &status);
5628 if (cnv == NULL || U_FAILURE(status)) {
5633 if (ucnv_isFixedWidth(cnv, &status)) {
5636 ucnv_close(cnv);