Lines Matching refs:errorCode
164 UErrorCode errorCode=U_ZERO_ERROR;
169 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
170 if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
172 } else if(U_FAILURE(errorCode)) {
173 log_err("%s ucnv_getNextUChar() failed: %s\n", message, u_errorName(errorCode));
192 UErrorCode errorCode=U_ZERO_ERROR;
194 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
195 if(errorCode != expected){
196 log_err("FAIL: Expected:%s when %s-----Got:%s\n", myErrorName(expected), message, myErrorName(errorCode));
1467 UErrorCode errorCode;
1471 errorCode=U_ZERO_ERROR;
1474 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode);
1475 if(U_FAILURE(errorCode)) {
1492 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous);
1501 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode));
1839 UErrorCode errorCode=U_ZERO_ERROR;
1840 UConverter *cnv=ucnv_open("UTF-7", &errorCode);
1841 if(U_FAILURE(errorCode)) {
1842 log_err("Unable to open a UTF-7 converter: %s\n", u_errorName(errorCode)); /* sholdn't be a data err */
1848 cnvName = ucnv_getName(cnv, &errorCode);
1849 if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "UTF-7") != 0) {
1850 log_err("UTF-7 converter is called %s: %s\n", cnvName, u_errorName(errorCode));
1882 UErrorCode errorCode=U_ZERO_ERROR;
1883 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode);
1884 if(U_FAILURE(errorCode)) {
1885 log_err("Unable to open a IMAP-mailbox-name converter: %s\n", u_errorName(errorCode)); /* sholdn't be a data err */
1891 cnvName = ucnv_getName(cnv, &errorCode);
1892 if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "IMAP-mailbox-name") != 0) {
1893 log_err("IMAP-mailbox-name converter is called %s: %s\n", cnvName, u_errorName(errorCode));
1944 UErrorCode errorCode=U_ZERO_ERROR;
1945 UConverter *cnv=ucnv_open("UTF-8", &errorCode);
1946 if(U_FAILURE(errorCode)) {
1947 log_err("Unable to open a UTF-8 converter: %s\n", u_errorName(errorCode));
1955 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2015 UErrorCode errorCode=U_ZERO_ERROR;
2016 UConverter *cnv=ucnv_open("CESU-8", &errorCode);
2017 if(U_FAILURE(errorCode)) {
2018 log_err("Unable to open a CESU-8 converter: %s\n", u_errorName(errorCode));
2026 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2067 UErrorCode errorCode=U_ZERO_ERROR;
2068 UConverter *cnv=ucnv_open("UTF-16", &errorCode);
2069 if(U_FAILURE(errorCode)) {
2070 log_err("Unable to open a UTF-16 converter: %s\n", u_errorName(errorCode));
2115 UErrorCode errorCode=U_ZERO_ERROR;
2116 UConverter *cnv=ucnv_open("utf-16be", &errorCode);
2117 if(U_FAILURE(errorCode)) {
2118 log_err("Unable to open a UTF16-BE converter: %s\n", u_errorName(errorCode));
2127 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2169 UErrorCode errorCode=U_ZERO_ERROR;
2170 UConverter *cnv=ucnv_open("utf-16le", &errorCode);
2171 if(U_FAILURE(errorCode)) {
2172 log_err("Unable to open a UTF16-LE converter: %s\n", u_errorName(errorCode));
2181 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2235 UErrorCode errorCode=U_ZERO_ERROR;
2236 UConverter *cnv=ucnv_open("UTF-32", &errorCode);
2237 if(U_FAILURE(errorCode)) {
2238 log_err("Unable to open a UTF-32 converter: %s\n", u_errorName(errorCode));
2311 UErrorCode errorCode=U_ZERO_ERROR;
2312 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode);
2313 if(U_FAILURE(errorCode)) {
2314 log_err("Unable to open a UTF-32BE converter: %s\n", u_errorName(errorCode));
2323 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2382 UErrorCode errorCode=U_ZERO_ERROR;
2383 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode);
2384 if(U_FAILURE(errorCode)) {
2385 log_err("Unable to open a UTF-32LE converter: %s\n", u_errorName(errorCode));
2394 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
2515 UErrorCode errorCode=U_ZERO_ERROR;
2516 UConverter *cnv=ucnv_open("LATIN_1", &errorCode);
2517 if(U_FAILURE(errorCode)) {
2518 log_data_err("Unable to open a LATIN_1 converter: %s\n", u_errorName(errorCode));
2546 UErrorCode errorCode=U_ZERO_ERROR;
2547 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode);
2548 if(U_FAILURE(errorCode)) {
2549 log_data_err("Unable to open a SBCS(x-mac-turkish) converter: %s\n", u_errorName(errorCode));
2588 UErrorCode errorCode=U_ZERO_ERROR;
2590 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode);
2591 if(U_FAILURE(errorCode)) {
2592 log_data_err("Unable to open a DBCS(@ibm9027) converter: %s\n", u_errorName(errorCode));
2606 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2639 UErrorCode errorCode=U_ZERO_ERROR;
2641 UConverter *cnv=ucnv_open("ibm-1363", &errorCode);
2642 if(U_FAILURE(errorCode)) {
2643 log_data_err("Unable to open a MBCS(ibm-1363) converter: %s\n", u_errorName(errorCode));
2657 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2747 UErrorCode errorCode=U_ZERO_ERROR;
2750 cnv=ucnv_open("ISO_2022", &errorCode);
2751 if(U_FAILURE(errorCode)) {
2752 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
2763 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
2791 UErrorCode errorCode=U_ZERO_ERROR;
2807 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2808 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2809 errorCode=U_ZERO_ERROR;
2813 if(U_FAILURE(errorCode)){
2814 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2823 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2824 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2825 errorCode=U_ZERO_ERROR;
2828 if(U_FAILURE(errorCode)){
2829 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2858 UErrorCode errorCode=U_ZERO_ERROR;
2868 numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)(uSourceLimit-uSource), &errorCode);
2869 if(U_FAILURE(errorCode)){
2870 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
2875 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode);
2876 if(U_FAILURE(errorCode)){
2877 log_err("ucnv_toUChars conversion failed, reason %s\n", u_errorName(errorCode));
2908 UErrorCode errorCode=U_ZERO_ERROR;
2927 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
2928 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2929 errorCode=U_ZERO_ERROR;
2933 if(U_FAILURE(errorCode)){
2934 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2945 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
2946 if(errorCode==U_BUFFER_OVERFLOW_ERROR){
2947 errorCode=U_ZERO_ERROR;
2950 if(U_FAILURE(errorCode)){
2951 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
2973 UErrorCode errorCode=U_ZERO_ERROR;
2978 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
2979 if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
2981 } else if(U_FAILURE(errorCode)) {
2982 log_err("%s ucnv_getNextUChar() failed: %s\n", message, u_errorName(errorCode));
3098 UErrorCode errorCode=U_ZERO_ERROR;
3102 cnv=ucnv_open("HZ", &errorCode);
3103 if(U_FAILURE(errorCode)) {
3104 log_data_err("Unable to open HZ converter: %s\n", u_errorName(errorCode));
3116 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3117 if(U_FAILURE(errorCode)){
3118 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3125 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3126 if(U_FAILURE(errorCode)){
3127 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3317 UErrorCode errorCode=U_ZERO_ERROR;
3321 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3322 if(U_FAILURE(errorCode)) {
3323 log_data_err("Unable to open an ISO_2022_JP_1 converter: %s\n", u_errorName(errorCode));
3335 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3336 if(U_FAILURE(errorCode)){
3337 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3344 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3345 if(U_FAILURE(errorCode)){
3346 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3383 UErrorCode errorCode=U_ZERO_ERROR;
3387 cnv=my_ucnv_open(conv, &errorCode);
3388 if(U_FAILURE(errorCode)) {
3389 log_data_err("Unable to open a %s converter: %s\n", conv, u_errorName(errorCode));
3401 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3402 if(U_FAILURE(errorCode)){
3403 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3411 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3412 if(U_FAILURE(errorCode)){
3413 log_err("ucnv_toUnicode conversion failed, reason: %s\n", u_errorName(errorCode));
3436 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3437 if(U_FAILURE(errorCode)){
3438 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3849 UErrorCode errorCode=U_ZERO_ERROR;
3852 cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
3853 if(U_FAILURE(errorCode)) {
3854 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
3866 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode);
3867 if(U_FAILURE(errorCode)){
3868 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3874 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode);
3875 if(U_FAILURE(errorCode)){
3876 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
3889 cnv=ucnv_open("ISO_2022,locale=jp,version=1", &errorCode);*/
3938 UErrorCode errorCode=U_ZERO_ERROR;
3942 cnv=ucnv_open("ISO_2022_JP_2", &errorCode);
3943 if(U_FAILURE(errorCode)) {
3944 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
3956 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
3957 if(U_FAILURE(errorCode)){
3958 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
3965 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
3966 if(U_FAILURE(errorCode)){
3967 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4015 UErrorCode errorCode=U_ZERO_ERROR;
4019 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode);
4020 if(U_FAILURE(errorCode)) {
4021 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4033 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4034 if(U_FAILURE(errorCode)){
4035 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4042 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4043 if(U_FAILURE(errorCode)){
4044 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4064 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4094 UErrorCode errorCode=U_ZERO_ERROR;
4098 cnv=ucnv_open("ibm-25546", &errorCode);
4099 if(U_FAILURE(errorCode)) {
4100 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4112 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4113 if(U_FAILURE(errorCode)){
4114 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4121 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4122 if(U_FAILURE(errorCode)){
4123 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4144 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
4157 UErrorCode errorCode = U_ZERO_ERROR;
4161 kr=ucnv_open("iso-2022-kr", &errorCode);
4162 if(U_FAILURE(errorCode)) {
4163 log_data_err("Unable to open a iso-2022-kr converter: %s\n", u_errorName(errorCode));
4166 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
4167 if(U_FAILURE(errorCode)) {
4168 log_err("iso-2022-kr cannot handle multiple escape sequences : %s\n", u_errorName(errorCode));
4171 kr1 = ucnv_open("ibm-25546", &errorCode);
4172 if(U_FAILURE(errorCode)) {
4173 log_data_err("Unable to open a iso-2022-kr_1 converter: %s\n", u_errorName(errorCode));
4178 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
4180 if(U_FAILURE(errorCode)) {
4181 log_err("iso-2022-kr_1 cannot handle multiple escape sequences : %s\n", u_errorName(errorCode));
4396 UErrorCode errorCode=U_ZERO_ERROR;
4400 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4401 if(U_FAILURE(errorCode)) {
4402 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4414 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4415 if(U_FAILURE(errorCode)){
4416 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4423 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4424 if(U_FAILURE(errorCode)){
4425 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4494 UErrorCode errorCode=U_ZERO_ERROR;
4498 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode);
4499 if(U_FAILURE(errorCode)) {
4500 log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
4512 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4513 if(U_FAILURE(errorCode)){
4514 log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
4521 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4522 if(U_FAILURE(errorCode)){
4523 log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
4656 UErrorCode errorCode=U_ZERO_ERROR;
4657 UConverter *cnv=ucnv_open("ibm-930", &errorCode);
4658 if(U_FAILURE(errorCode)) {
4659 log_data_err("Unable to open a EBCDIC_STATEFUL(ibm-930) converter: %s\n", u_errorName(errorCode));
4732 UErrorCode errorCode=U_ZERO_ERROR;
4733 UConverter *cnv=ucnv_open("gb18030", &errorCode);
4734 if(U_FAILURE(errorCode)) {
4735 log_data_err("Unable to open a gb18030 converter: %s\n", u_errorName(errorCode));
4841 UErrorCode errorCode=U_ZERO_ERROR;
4844 cnv1=ucnv_open(NAME_LMBCS_1, &errorCode);
4845 if(U_FAILURE(errorCode)) {
4846 log_data_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
4849 cnv2=ucnv_open(NAME_LMBCS_2, &errorCode);
4850 if(U_FAILURE(errorCode)) {
4851 errorCode));
4856 get_name = ucnv_getName (cnv1, &errorCode);
4860 get_name = ucnv_getName (cnv2, &errorCode);
4866 ucnv_getSubstChars (cnv1, get_subchars, &len, &errorCode);
4867 if(U_FAILURE(errorCode)) {
4868 log_err("Failure on get subst chars: %s\n", u_errorName(errorCode));
4876 ucnv_setSubstChars (cnv2,new_subchars, len, &errorCode);
4877 if(U_FAILURE(errorCode)) {
4878 log_err("Failure on set subst chars: %s\n", u_errorName(errorCode));
4880 ucnv_getSubstChars (cnv2, get_subchars, &len, &errorCode);
4881 if(U_FAILURE(errorCode)) {
4882 log_err("Failure on get subst chars: %s\n", u_errorName(errorCode));
4897 UErrorCode errorCode=U_ZERO_ERROR;
4915 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */
4916 if(U_FAILURE(errorCode)) {
4917 log_data_err("Unable to open a LMBCS converter: %s\n", u_errorName(errorCode));
4930 &errorCode);
4951 UErrorCode errorCode=U_ZERO_ERROR;
4954 cnv=ucnv_open("LMBCS-1", &errorCode);
4955 if(U_FAILURE(errorCode)) {
4956 log_data_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
4964 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
4965 if(U_FAILURE(errorCode)) {
4966 log_err("LMBCS-1 ucnv_getNextUChar() failed: %s\n", u_errorName(errorCode));
4981 UErrorCode errorCode=U_ZERO_ERROR;
4982 UConverter *cnv16he = ucnv_open("LMBCS-16,locale=he", &errorCode);
4983 UConverter *cnv16jp = ucnv_open("LMBCS-16,locale=ja_JP", &errorCode);
4984 UConverter *cnv01us = ucnv_open("LMBCS-1,locale=us_EN", &errorCode);
4996 NULL, 1, &errorCode);
5008 NULL, 1, &errorCode);
5022 NULL, 1, &errorCode);
5023 if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+1 || pUniIn != uniString+1 || uniString[0] != 0xFF6E)
5033 NULL, 1, &errorCode);
5034 if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+3 || pUniOut != uniString+1
5044 NULL, 1, &errorCode);
5045 if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+3 || pUniIn != uniString+1 || uniString[0] != 0xFF6E)
5054 NULL, 1, &errorCode);
5055 if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+1 || pUniOut != uniString+1 || lmbcsString[0] != 0xAE)
5066 UErrorCode errorCode=U_ZERO_ERROR;
5077 cnv = ucnv_open(NAME_LMBCS_1, &errorCode);
5078 if(U_FAILURE(errorCode)) {
5079 log_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
5084 while ((pSource < sourceLimit) && U_SUCCESS (errorCode))
5093 &errorCode);
5095 if (U_SUCCESS (errorCode))
5112 log_err("Unexpected Error on toUnicode: %s\n", u_errorName(errorCode));
5132 errorCode=U_ZERO_ERROR;
5135 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn-1,off,FALSE, &errorCode);
5136 if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
5138 log_err("Unexpected Error on negative source request to ucnv_fromUnicode: %s\n", u_errorName(errorCode));
5140 errorCode=U_ZERO_ERROR;
5141 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCode);
5142 if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
5144 log_err("Unexpected Error on negative source request to ucnv_toUnicode: %s\n", u_errorName(errorCode));
5146 errorCode=U_ZERO_ERROR;
5148 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode);
5149 if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
5151 log_err("Unexpected Error on negative source request to ucnv_getNextUChar: %s\n", u_errorName(errorCode));
5153 errorCode=U_ZERO_ERROR;
5156 ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode);
5157 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode);
5158 if(U_FAILURE(errorCode)) {
5159 log_err("0 byte source request: unexpected error: %s\n", u_errorName(errorCode));
5166 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode);
5167 if (errorCode != U_INDEX_OUTOFBOUNDS_ERROR)
5169 log_err("Unexpected Error on 0-byte source request to ucnv_getnextUChar: %s\n", u_errorName(errorCode));
5175 errorCode = U_ZERO_ERROR;
5180 ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALSE, &errorCode);
5181 if (errorCode != U_BUFFER_OVERFLOW_ERROR || pLOut != LOut + offsets[4] || pUIn != pszUnicode+4 )
5186 errorCode = U_ZERO_ERROR;
5189 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode);
5190 if (errorCode != U_BUFFER_OVERFLOW_ERROR || pUOut != UOut + 4 || pLIn != (const char *)pszLMBCS+offsets[4])
5204 errorCode = U_ZERO_ERROR;
5207 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
5208 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5209 if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
5219 errorCode = U_ZERO_ERROR;
5222 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+3),off,TRUE, &errorCode);
5223 if (UOut[0] != 0xD801 || U_FAILURE(errorCode) || pUOut != UOut + 1 || pLIn != LIn + 3)
5236 errorCode = U_ZERO_ERROR;
5239 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+6),off,TRUE, &errorCode);
5240 if (UOut[0] != 0xD801 || UOut[1] != 0xC9D0 || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 6)
5253 errorCode = U_ZERO_ERROR;
5256 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5257 if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
5270 errorCode = U_ZERO_ERROR;
5273 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
5274 errorCode) || pUOut != UOut + 2 || pLIn != LIn + 5)
5286 errorCode = U_ZERO_ERROR;
5289 ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+4),off,TRUE, &errorCode);
5291 if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 4)
5468 log_data_err("Unable to open converter: iscii-gur got errorCode: %s\n", u_errorName(status));