Lines Matching refs:errorCode
179 UErrorCode errorCode=U_ZERO_ERROR;
184 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
185 if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
187 } else if(U_FAILURE(errorCode)) {
188 log_err("%s ucnv_getNextUChar() failed: %s\n", message, u_errorName(errorCode));
207 UErrorCode errorCode=U_ZERO_ERROR;
209 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
210 if(errorCode != expected){
211 log_err("FAIL: Expected:%s when %s-----Got:%s\n", myErrorName(expected), message, myErrorName(errorCode));
1463 UErrorCode errorCode;
1467 errorCode=U_ZERO_ERROR;
1470 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode);
1471 if(U_FAILURE(errorCode)) {
1488 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous);
1497 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode));
1833 UErrorCode errorCode=U_ZERO_ERROR;
1834 UConverter *cnv=ucnv_open("UTF-7", &errorCode);
1835 if(U_FAILURE(errorCode)) {
1836 log_data_err("Unable to open a UTF-7 converter: %s\n", u_errorName(errorCode));
1842 cnvName = ucnv_getName(cnv, &errorCode);
1843 if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "UTF-7") != 0) {
1844 log_err("UTF-7 converter is called %s: %s\n", cnvName, u_errorName(errorCode));
1876 UErrorCode errorCode=U_ZERO_ERROR;
1877 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode);
1878 if(U_FAILURE(errorCode)) {
1879 log_data_err("Unable to open a IMAP-mailbox-name converter: %s\n", u_errorName(errorCode));
1885 cnvName = ucnv_getName(cnv, &errorCode);
1886 if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "IMAP-mailbox-name") != 0) {
1887 log_err("IMAP-mailbox-name converter is called %s: %s\n", cnvName, u_errorName(errorCode));
1938 UErrorCode errorCode=U_ZERO_ERROR;
1939 UConverter *cnv=ucnv_open("UTF-8", &errorCode);
1940 if(U_FAILURE(errorCode)) {
1941 log_err("Unable to open a UTF-8 converter: %s\n", u_errorName(errorCode));
1949 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2009 UErrorCode errorCode=U_ZERO_ERROR;
2010 UConverter *cnv=ucnv_open("CESU-8", &errorCode);
2011 if(U_FAILURE(errorCode)) {
2012 log_data_err("Unable to open a CESU-8 converter: %s\n", u_errorName(errorCode));
2020 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2061 UErrorCode errorCode=U_ZERO_ERROR;
2062 UConverter *cnv=ucnv_open("UTF-16", &errorCode);
2063 if(U_FAILURE(errorCode)) {
2064 log_err("Unable to open a UTF-16 converter: %s\n", u_errorName(errorCode));
2109 UErrorCode errorCode=U_ZERO_ERROR;
2110 UConverter *cnv=ucnv_open("utf-16be", &errorCode);
2111 if(U_FAILURE(errorCode)) {
2112 log_err("Unable to open a UTF16-BE converter: %s\n", u_errorName(errorCode));
2121 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2163 UErrorCode errorCode=U_ZERO_ERROR;
2164 UConverter *cnv=ucnv_open("utf-16le", &errorCode);
2165 if(U_FAILURE(errorCode)) {
2166 log_err("Unable to open a UTF16-LE converter: %s\n", u_errorName(errorCode));
2175 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2229 UErrorCode errorCode=U_ZERO_ERROR;
2230 UConverter *cnv=ucnv_open("UTF-32", &errorCode);
2231 if(U_FAILURE(errorCode)) {
2232 log_data_err("Unable to open a UTF-32 converter: %s\n", u_errorName(errorCode));
2305 UErrorCode errorCode=U_ZERO_ERROR;
2306 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode);
2307 if(U_FAILURE(errorCode)) {
2308 log_data_err("Unable to open a UTF-32BE converter: %s\n", u_errorName(errorCode));
2317 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2376 UErrorCode errorCode=U_ZERO_ERROR;
2377 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode);
2378 if(U_FAILURE(errorCode)) {
2379 log_data_err("Unable to open a UTF-32LE converter: %s\n", u_errorName(errorCode));
2388 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2509 UErrorCode errorCode=U_ZERO_ERROR;
2510 UConverter *cnv=ucnv_open("LATIN_1", &errorCode);
2511 if(U_FAILURE(errorCode)) {
2512 log_data_err("Unable to open a LATIN_1 converter: %s\n", u_errorName(errorCode));
2540 UErrorCode errorCode=U_ZERO_ERROR;
2541 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode);
2542 if(U_FAILURE(errorCode)) {
2543 log_data_err("Unable to open a SBCS(x-mac-turkish) converter: %s\n", u_errorName(errorCode));
2582 UErrorCode errorCode=U_ZERO_ERROR;
2584 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode);
2585 if(U_FAILURE(errorCode)) {
2586 log_data_err("Unable to open a DBCS(@ibm9027) converter: %s\n", u_errorName(errorCode));
2600 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2633 UErrorCode errorCode=U_ZERO_ERROR;
2635 UConverter *cnv=ucnv_open("ibm-1363", &errorCode);
2636 if(U_FAILURE(errorCode)) {
2637 log_data_err("Unable to open a MBCS(ibm-1363) converter: %s\n", u_errorName(errorCode));
2651 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2743 UErrorCode errorCode=U_ZERO_ERROR;
2746 cnv=ucnv_open("ISO_2022", &errorCode);
2747 if(U_FAILURE(errorCode)) {
2748 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
2759 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2787 UErrorCode errorCode=U_ZERO_ERROR;
2803 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2804 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2805 errorCode=U_ZERO_ERROR;
2809 if(U_FAILURE(errorCode)){
2810 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2819 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2820 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2821 errorCode=U_ZERO_ERROR;
2824 if(U_FAILURE(errorCode)){
2825 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2854 UErrorCode errorCode=U_ZERO_ERROR;
2864 numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)(uSourceLimit-uSource), &errorCode);
2865 if(U_FAILURE(errorCode)){
2866 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
2871 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode);
2872 if(U_FAILURE(errorCode)){
2873 log_err("ucnv_toUChars conversion failed, reason %s\n", u_errorName(errorCode));
2904 UErrorCode errorCode=U_ZERO_ERROR;
2923 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2924 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2925 errorCode=U_ZERO_ERROR;
2929 if(U_FAILURE(errorCode)){
2930 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2941 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2942 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2943 errorCode=U_ZERO_ERROR;
2946 if(U_FAILURE(errorCode)){
2947 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2969 UErrorCode errorCode=U_ZERO_ERROR;
2974 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
2975 if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
2977 } else if(U_FAILURE(errorCode)) {
2978 log_err("%s ucnv_getNextUChar() failed: %s\n", message, u_errorName(errorCode));
3094 UErrorCode errorCode=U_ZERO_ERROR;
3098 cnv=ucnv_open("HZ", &errorCode);
3099 if(U_FAILURE(errorCode)) {
3100 log_data_err("Unable to open HZ converter: %s\n", u_errorName(errorCode));
3112 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3113 if(U_FAILURE(errorCode)){
3114 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3121 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3122 if(U_FAILURE(errorCode)){
3123 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3313 UErrorCode errorCode=U_ZERO_ERROR;
3317 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3318 if(U_FAILURE(errorCode)) {
3319 log_data_err("Unable to open an ISO_2022_JP_1 converter: %s\n", u_errorName(errorCode));
3331 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3332 if(U_FAILURE(errorCode)){
3333 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3340 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3341 if(U_FAILURE(errorCode)){
3342 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3379 UErrorCode errorCode=U_ZERO_ERROR;
3383 cnv=my_ucnv_open(conv, &errorCode);
3384 if(U_FAILURE(errorCode)) {
3385 log_data_err("Unable to open a %s converter: %s\n", conv, u_errorName(errorCode));
3397 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3398 if(U_FAILURE(errorCode)){
3399 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3407 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3408 if(U_FAILURE(errorCode)){
3409 log_err("ucnv_toUnicode conversion failed, reason: %s\n", u_errorName(errorCode));
3432 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3433 if(U_FAILURE(errorCode)){
3434 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3856 UErrorCode errorCode=U_ZERO_ERROR;
3859 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3860 if(U_FAILURE(errorCode)) {
3861 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
3873 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode);
3874 if(U_FAILURE(errorCode)){
3875 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3881 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode);
3882 if(U_FAILURE(errorCode)){
3883 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3896 cnv=ucnv_open("ISO_2022,locale=jp,version=1", &errorCode);*/
3945 UErrorCode errorCode=U_ZERO_ERROR;
3949 cnv=ucnv_open("ISO_2022_JP_2", &errorCode);
3950 if(U_FAILURE(errorCode)) {
3951 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
3963 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3964 if(U_FAILURE(errorCode)){
3965 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3972 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3973 if(U_FAILURE(errorCode)){
3974 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4022 UErrorCode errorCode=U_ZERO_ERROR;
4026 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode);
4027 if(U_FAILURE(errorCode)) {
4028 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4040 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4041 if(U_FAILURE(errorCode)){
4042 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4049 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4050 if(U_FAILURE(errorCode)){
4051 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4071 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4101 UErrorCode errorCode=U_ZERO_ERROR;
4105 cnv=ucnv_open("ibm-25546", &errorCode);
4106 if(U_FAILURE(errorCode)) {
4107 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4119 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4120 if(U_FAILURE(errorCode)){
4121 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4128 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4129 if(U_FAILURE(errorCode)){
4130 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4151 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4164 UErrorCode errorCode = U_ZERO_ERROR;
4168 kr=ucnv_open("iso-2022-kr", &errorCode);
4169 if(U_FAILURE(errorCode)) {
4170 log_data_err("Unable to open a iso-2022-kr converter: %s\n", u_errorName(errorCode));
4173 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
4174 if(U_FAILURE(errorCode)) {
4175 log_err("iso-2022-kr cannot handle multiple escape sequences : %s\n", u_errorName(errorCode));
4178 kr1 = ucnv_open("ibm-25546", &errorCode);
4179 if(U_FAILURE(errorCode)) {
4180 log_data_err("Unable to open a iso-2022-kr_1 converter: %s\n", u_errorName(errorCode));
4185 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
4187 if(U_FAILURE(errorCode)) {
4188 log_err("iso-2022-kr_1 cannot handle multiple escape sequences : %s\n", u_errorName(errorCode));
4407 UErrorCode errorCode=U_ZERO_ERROR;
4411 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4412 if(U_FAILURE(errorCode)) {
4413 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4425 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4426 if(U_FAILURE(errorCode)){
4427 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4434 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4435 if(U_FAILURE(errorCode)){
4436 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4506 UErrorCode errorCode=U_ZERO_ERROR;
4510 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode);
4511 if(U_FAILURE(errorCode)) {
4512 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4524 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4525 if(U_FAILURE(errorCode)){
4526 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4533 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4534 if(U_FAILURE(errorCode)){
4535 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4668 UErrorCode errorCode=U_ZERO_ERROR;
4669 UConverter *cnv=ucnv_open("ibm-930", &errorCode);
4670 if(U_FAILURE(errorCode)) {
4671 log_data_err("Unable to open a EBCDIC_STATEFUL(ibm-930) converter: %s\n", u_errorName(errorCode));
4744 UErrorCode errorCode=U_ZERO_ERROR;
4745 UConverter *cnv=ucnv_open("gb18030", &errorCode);
4746 if(U_FAILURE(errorCode)) {
4747 log_data_err("Unable to open a gb18030 converter: %s\n", u_errorName(errorCode));
4853 UErrorCode errorCode=U_ZERO_ERROR;
4856 cnv1=ucnv_open(NAME_LMBCS_1, &errorCode);
4857 if(U_FAILURE(errorCode)) {
4858 log_data_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
4861 cnv2=ucnv_open(NAME_LMBCS_2, &errorCode);
4862 if(U_FAILURE(errorCode)) {
4863 log_data_err("Unable to open a LMBCS-2 converter: %s\n", u_errorName(errorCode));
4868 get_name = ucnv_getName (cnv1, &errorCode);
4872 get_name = ucnv_getName (cnv2, &errorCode);
4878 ucnv_getSubstChars (cnv1, get_subchars, &len, &errorCode);
4879 if(U_FAILURE(errorCode)) {
4880 log_err("Failure on get subst chars: %s\n", u_errorName(errorCode));
4888 ucnv_setSubstChars (cnv2,new_subchars, len, &errorCode);
4889 if(U_FAILURE(errorCode)) {
4890 log_err("Failure on set subst chars: %s\n", u_errorName(errorCode));
4892 ucnv_getSubstChars (cnv2, get_subchars, &len, &errorCode);
4893 if(U_FAILURE(errorCode)) {
4894 log_err("Failure on get subst chars: %s\n", u_errorName(errorCode));
4909 UErrorCode errorCode=U_ZERO_ERROR;
4927 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */
4928 if(U_FAILURE(errorCode)) {
4929 log_data_err("Unable to open a LMBCS converter: %s\n", u_errorName(errorCode));
4942 &errorCode);
4963 UErrorCode errorCode=U_ZERO_ERROR;
4966 cnv=ucnv_open("LMBCS-1", &errorCode);
4967 if(U_FAILURE(errorCode)) {
4968 log_data_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
4976 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
4977 if(U_FAILURE(errorCode)) {
4978 log_err("LMBCS-1 ucnv_getNextUChar() failed: %s\n", u_errorName(errorCode));
4993 UErrorCode errorCode=U_ZERO_ERROR;
4994 UConverter *cnv16he = ucnv_open("LMBCS-16,locale=he", &errorCode);
4995 UConverter *cnv16jp = ucnv_open("LMBCS-16,locale=ja_JP", &errorCode);
4996 UConverter *cnv01us = ucnv_open("LMBCS-1,locale=us_EN", &errorCode);
5008 NULL, 1, &errorCode);
5020 NULL, 1, &errorCode);
5034 NULL, 1, &errorCode);
5035 if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+1 || pUniIn != uniString+1 || uniString[0] != 0xFF6E)
5045 NULL, 1, &errorCode);
5046 if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+3 || pUniOut != uniString+1
5056 NULL, 1, &errorCode);
5057 if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+3 || pUniIn != uniString+1 || uniString[0] != 0xFF6E)
5066 NULL, 1, &errorCode);
5067 if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+1 || pUniOut != uniString+1 || lmbcsString[0] != 0xAE)
5078 UErrorCode errorCode=U_ZERO_ERROR;
5089 cnv = ucnv_open(NAME_LMBCS_1, &errorCode);
5090 if(U_FAILURE(errorCode)) {
5091 log_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
5096 while ((pSource < sourceLimit) && U_SUCCESS (errorCode))
5105 &errorCode);
5107 if (U_SUCCESS (errorCode))
5124 log_err("Unexpected Error on toUnicode: %s\n", u_errorName(errorCode));
5144 errorCode=U_ZERO_ERROR;
5148 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode);
5149 if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
5151 log_err("Unexpected Error on negative source request to ucnv_fromUnicode: %s\n", u_errorName(errorCode));
5155 errorCode=U_ZERO_ERROR;
5156 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCode);
5157 if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
5159 log_err("Unexpected Error on negative source request to ucnv_toUnicode: %s\n", u_errorName(errorCode));
5161 errorCode=U_ZERO_ERROR;
5163 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode);
5164 if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
5166 log_err("Unexpected Error on negative source request to ucnv_getNextUChar: %s\n", u_errorName(errorCode));
5168 errorCode=U_ZERO_ERROR;
5171 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode);
5172 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode);
5173 if(U_FAILURE(errorCode)) {
5174 log_err("0 byte source request: unexpected error: %s\n", u_errorName(errorCode));
5181 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode);
5182 if (errorCode != U_INDEX_OUTOFBOUNDS_ERROR)
5184 log_err("Unexpected Error on 0-byte source request to ucnv_getnextUChar: %s\n", u_errorName(errorCode));
5190 errorCode = U_ZERO_ERROR;
5195 ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALSE, &errorCode);
5196 if (errorCode != U_BUFFER_OVERFLOW_ERROR || pLOut != LOut + offsets[4] || pUIn != pszUnicode+4 )
5201 errorCode = U_ZERO_ERROR;
5204 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode);
5205 if (errorCode != U_BUFFER_OVERFLOW_ERROR || pUOut != UOut + 4 || pLIn != (const char *)pszLMBCS+offsets[4])
5219 errorCode = U_ZERO_ERROR;
5222 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
5223 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5224 if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
5234 errorCode = U_ZERO_ERROR;
5237 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+3),off,TRUE, &errorCode);
5238 if (UOut[0] != 0xD801 || U_FAILURE(errorCode) || pUOut != UOut + 1 || pLIn != LIn + 3)
5251 errorCode = U_ZERO_ERROR;
5254 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+6),off,TRUE, &errorCode);
5255 if (UOut[0] != 0xD801 || UOut[1] != 0xC9D0 || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 6)
5268 errorCode = U_ZERO_ERROR;
5271 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5272 if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
5285 errorCode = U_ZERO_ERROR;
5288 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5289 if (UOut[0] != 0xD801 || UOut[1] != 0x1B || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 5)
5301 errorCode = U_ZERO_ERROR;
5304 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+4),off,TRUE, &errorCode);
5306 if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 4)
5492 log_data_err("Unable to open converter: iscii-gur got errorCode: %s\n", u_errorName(status));