Home | History | Annotate | Download | only in cintltst

Lines Matching defs:cnv

31 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
32 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
120 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
131 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err)
133 if(cnv && cnv[0] == '@') {
134 return ucnv_openPackage(loadTestData(err), cnv+1, err);
136 return ucnv_open(cnv, err);
176 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message)
186 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
206 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message)
211 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);
1541 const char* cnvName = ucnv_getName(cnv, &status);
1544 TestAmbiguousConverter(cnv);
1547 ucnv_close(cnv);
1849 UConverter *cnv=ucnv_open("UTF-7", &errorCode);
1854 TestNextUChar(cnv, source, limit, results, "UTF-7");
1856 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1857 cnvName = ucnv_getName(cnv, &errorCode);
1861 ucnv_close(cnv);
1892 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode);
1897 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name");
1899 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1900 cnvName = ucnv_getName(cnv, &errorCode);
1904 ucnv_close(cnv);
1954 UConverter *cnv=ucnv_open("UTF-8", &errorCode);
1959 TestNextUChar(cnv, source, limit, results, "UTF-8");
1961 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1964 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
1967 TestNextUChar(cnv, source, limit, results2, "UTF-8");
1969 ucnv_close(cnv);
2025 UConverter *cnv=ucnv_open("CESU-8", &errorCode);
2030 TestNextUChar(cnv, source, limit, results, "CESU-8");
2032 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2035 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2038 TestNextUChar(cnv, source, limit, results2, "CESU-8");
2040 ucnv_close(cnv);
2077 UConverter *cnv=ucnv_open("UTF-16", &errorCode);
2084 TestNextUChar(cnv, source, limit, results1, "UTF-16");
2087 ucnv_resetToUnicode(cnv);
2088 TestNextUChar(cnv, source, limit, results2, "UTF-16");
2091 ucnv_resetToUnicode(cnv);
2092 TestNextUChar(cnv, source, limit, results3, "UTF-16");
2095 ucnv_resetToUnicode(cnv);
2096 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2098 ucnv_close(cnv);
2125 UConverter *cnv=ucnv_open("utf-16be", &errorCode);
2130 TestNextUChar(cnv, source, limit, results, "UTF-16BE");
2132 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2136 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2137 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
2150 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
2153 ucnv_close(cnv);
2179 UConverter *cnv=ucnv_open("utf-16le", &errorCode);
2184 TestNextUChar(cnv, source, limit, results, "UTF-16LE");
2186 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2190 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2191 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
2204 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
2208 ucnv_close(cnv);
2245 UConverter *cnv=ucnv_open("UTF-32", &errorCode);
2252 TestNextUChar(cnv, source, limit, results1, "UTF-32");
2255 ucnv_resetToUnicode(cnv);
2256 TestNextUChar(cnv, source, limit, results2, "UTF-32");
2259 ucnv_resetToUnicode(cnv);
2260 TestNextUChar(cnv, source, limit, results3, "UTF-32");
2263 ucnv_resetToUnicode(cnv);
2264 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2266 ucnv_close(cnv);
2321 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode);
2326 TestNextUChar(cnv, source, limit, results, "UTF-32BE");
2329 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2332 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2335 TestNextUChar(cnv, source, limit, results2, "UTF-32BE");
2337 ucnv_close(cnv);
2392 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode);
2397 TestNextUChar(cnv, source, limit, results, "UTF-32LE");
2400 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2403 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2406 TestNextUChar(cnv, source, limit, results2, "UTF-32LE");
2408 ucnv_close(cnv);
2525 UConverter *cnv=ucnv_open("LATIN_1", &errorCode);
2530 TestNextUChar(cnv, source, limit, results, "LATIN_1");
2532 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2536 ucnv_close(cnv);
2556 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode);
2561 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)");
2563 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2568 TestNextUCharError(cnv, illegalsource, illegalsource+sizeof(illegalsource), U_INVALID_CHAR_FOUND, "source has a illegal characte");
2571 ucnv_close(cnv);
2599 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode);
2604 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)");
2606 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2610 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
2615 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2616 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2618 ucnv_close(cnv);
2650 UConverter *cnv=ucnv_open("ibm-1363", &errorCode);
2655 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)");
2657 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2661 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
2666 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2667 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2669 ucnv_close(cnv);
2685 UConverter *cnv=ucnv_open(cnvName, &status);
2696 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status);
2709 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2712 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2715 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2724 ucnv_close(cnv);
2759 UConverter *cnv;
2761 cnv=ucnv_open("ISO_2022", &errorCode);
2766 TestNextUChar(cnv, source, limit, results, "ISO_2022");
2769 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source");
2770 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2774 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2775 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
2780 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR_FOUND, "an invalid character");
2782 ucnv_close(cnv);
2788 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2805 ucnv_reset(cnv);
2818 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2834 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2857 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2878 ucnv_reset(cnv);
2879 numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)(uSourceLimit-uSource), &errorCode);
2886 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode);
2904 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2923 ucnv_reset(cnv);
2938 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2956 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2979 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit,
2986 ucnv_reset(cnv);
2989 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
3110 UConverter *cnv;
3113 cnv=ucnv_open("HZ", &errorCode);
3127 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3136 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3150 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding");
3151 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3152 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3153 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3155 ucnv_close(cnv);
3329 UConverter *cnv;
3332 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3346 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3355 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3371 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3372 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3373 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding");
3374 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3376 ucnv_close(cnv);
3395 UConverter *cnv;
3398 cnv=my_ucnv_open(conv, &errorCode);
3412 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3422 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3436 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv);
3437 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv);
3438 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv);
3440 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang);
3441 TestToAndFromUChars(in,(const UChar*)&in[len],cnv);
3447 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3464 ucnv_close(cnv);
3776 /* UConverter* cnv = ucnv_open("SCSU",&status); */
3872 UConverter *cnv;
3874 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3888 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode);
3896 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode);
3910 /*ucnv_close(cnv);
3911 cnv=ucnv_open("ISO_2022,locale=jp,version=1", &errorCode);*/
3913 ucnv_reset(cnv);
3916 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-1]");
3918 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3919 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
3920 ucnv_close(cnv);
3961 UConverter *cnv;
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 cnv);
4002 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4003 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),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]");
4010 ucnv_close(cnv);
4038 UConverter *cnv;
4041 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode);
4055 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4064 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4077 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
4078 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4079 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4080 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4083 ucnv_reset(cnv);
4086 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4087 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
4089 ucnv_close(cnv);
4117 UConverter *cnv;
4120 cnv=ucnv_open("ibm-25546", &errorCode);
4134 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4143 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4156 ucnv_reset(cnv);
4157 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
4158 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4159 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4160 ucnv_reset(cnv);
4161 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4163 ucnv_reset(cnv);
4166 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4167 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
4169 ucnv_close(cnv);
4423 UConverter *cnv;
4426 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4440 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4449 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4465 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4466 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4468 ucnv_reset(cnv);
4471 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN-EXT]");
4473 ucnv_close(cnv);
4522 UConverter *cnv;
4525 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode);
4539 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4548 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4564 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding");
4565 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4566 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4567 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4570 ucnv_reset(cnv);
4573 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN]");
4576 ucnv_close(cnv);
4623 UConverter * cnv = ucnv_open(testPtr->converterName, &err);
4628 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err);
4631 ucnv_close(cnv);
4640 ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err);
4642 ucnv_close(cnv);
4684 UConverter *cnv=ucnv_open("ibm-930", &errorCode);
4689 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)");
4690 ucnv_reset(cnv);
4692 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
4693 ucnv_reset(cnv);
4697 TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFBOUNDS_ERROR, "a character is truncated");
4700 ucnv_reset(cnv);
4703 TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [EBCDIC STATEFUL]");
4705 ucnv_reset(cnv);
4708 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2");
4709 ucnv_close(cnv);
4760 UConverter *cnv=ucnv_open("gb18030", &errorCode);
4765 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030");
4766 ucnv_close(cnv);
4850 cnv;
4942 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */
4950 ucnv_toUnicode (cnv,
4968 ucnv_close(cnv);
4981 cnv=ucnv_open("LMBCS-1", &errorCode);
4991 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
5004 ucnv_close(cnv);
5104 cnv = ucnv_open(NAME_LMBCS_1, &errorCode);
5113 ucnv_toUnicode (cnv,
5163 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode);
5171 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCode);
5178 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode);
5186 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode);
5187 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode);
5196 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode);
5210 ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALSE, &errorCode);
5219 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode);
5237 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
5238 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5252 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+3),off,TRUE, &errorCode);
5269 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+6),off,TRUE, &errorCode);
5286 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5303 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5319 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+4),off,TRUE, &errorCode);
5327 ucnv_close(cnv); /* final cleanup */
5338 UConverter *cnv = 0;
5340 cnv = ucnv_open("shift-jis", &status);
5341 if (U_FAILURE(status) || cnv == 0) {
5347 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status);
5354 ucnv_close(cnv);
5369 UConverter *cnv = 0;
5371 cnv = ucnv_open("ebcdic-xml-us", &status);
5372 if (U_FAILURE(status) || cnv == 0) {
5376 ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &status);
5384 ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRUE, &status);
5391 ucnv_close(cnv);
5574 UConverter *cnv = NULL;
5591 cnv = ucnv_open(fixedWidth[i], &status);
5592 if (cnv == NULL || U_FAILURE(status)) {
5597 if (!ucnv_isFixedWidth(cnv, &status)) {
5600 ucnv_close(cnv);
5604 cnv = ucnv_open(notFixedWidth[i], &status);
5605 if (cnv == NULL || U_FAILURE(status)) {
5610 if (ucnv_isFixedWidth(cnv, &status)) {
5613 ucnv_close(cnv);