Lines Matching refs:ch
46 UChar32 ch; in u_strFromUTF32WithSub() local
75 while((ch=*src) != 0 && in u_strFromUTF32WithSub()
76 ((uint32_t)ch < 0xd800 || (0xe000 <= ch && ch <= 0xffff))) { in u_strFromUTF32WithSub()
79 *pDest++ = (UChar)ch; in u_strFromUTF32WithSub()
85 if(ch != 0) { in u_strFromUTF32WithSub()
95 ch = *src++; in u_strFromUTF32WithSub()
98 if((uint32_t)ch < 0xd800 || (0xe000 <= ch && ch <= 0xffff)) { in u_strFromUTF32WithSub()
100 *pDest++ = (UChar)ch; in u_strFromUTF32WithSub()
105 } else if(0x10000 <= ch && ch <= 0x10ffff) { in u_strFromUTF32WithSub()
107 *pDest++ = U16_LEAD(ch); in u_strFromUTF32WithSub()
108 *pDest++ = U16_TRAIL(ch); in u_strFromUTF32WithSub()
113 } else if((ch = subchar) < 0) { in u_strFromUTF32WithSub()
160 UChar32 ch; in u_strToUTF32WithSub() local
190 while((ch=*src) != 0 && !U16_IS_SURROGATE(ch)) { in u_strToUTF32WithSub()
193 *pDest++ = ch; in u_strToUTF32WithSub()
199 if(ch != 0) { in u_strToUTF32WithSub()
209 ch = *src++; in u_strToUTF32WithSub()
210 if(!U16_IS_SURROGATE(ch)) { in u_strToUTF32WithSub()
212 } else if(U16_IS_SURROGATE_LEAD(ch) && src < srcLimit && U16_IS_TRAIL(ch2 = *src)) { in u_strToUTF32WithSub()
214 ch = U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF32WithSub()
215 } else if((ch = subchar) < 0) { in u_strToUTF32WithSub()
223 *pDest++ = ch; in u_strToUTF32WithSub()
409 UChar32 ch; in u_strFromUTF8WithSub() local
452 while(((ch = *pSrc) != 0) && (pDest < pDestLimit)) { in u_strFromUTF8WithSub()
453 if(ch <= 0x7f){ in u_strFromUTF8WithSub()
454 *pDest++=(UChar)ch; in u_strFromUTF8WithSub()
457 if(ch > 0xe0) { in u_strFromUTF8WithSub()
459 ch <= 0xec && in u_strFromUTF8WithSub()
464 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromUTF8WithSub()
468 } else if(ch < 0xe0) { in u_strFromUTF8WithSub()
470 ch >= 0xc2 && in u_strFromUTF8WithSub()
473 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromUTF8WithSub()
481 ch=utf8_nextCharSafeBodyTerminated(&pSrc, ch); in u_strFromUTF8WithSub()
482 if(ch<0 && (++numSubstitutions, ch = subchar) < 0) { in u_strFromUTF8WithSub()
485 } else if(ch<=0xFFFF) { in u_strFromUTF8WithSub()
486 *(pDest++)=(UChar)ch; in u_strFromUTF8WithSub()
488 *(pDest++)=U16_LEAD(ch); in u_strFromUTF8WithSub()
490 *(pDest++)=U16_TRAIL(ch); in u_strFromUTF8WithSub()
500 while((ch = *pSrc) != 0) { in u_strFromUTF8WithSub()
501 if(ch <= 0x7f){ in u_strFromUTF8WithSub()
505 if(ch > 0xe0) { in u_strFromUTF8WithSub()
507 ch <= 0xec && in u_strFromUTF8WithSub()
515 } else if(ch < 0xe0) { in u_strFromUTF8WithSub()
517 ch >= 0xc2 && in u_strFromUTF8WithSub()
528 ch=utf8_nextCharSafeBodyTerminated(&pSrc, ch); in u_strFromUTF8WithSub()
529 if(ch<0 && (++numSubstitutions, ch = subchar) < 0) { in u_strFromUTF8WithSub()
533 reqLength += U16_LENGTH(ch); in u_strFromUTF8WithSub()
562 ch = *pSrc; in u_strFromUTF8WithSub()
563 if(ch <= 0x7f){ in u_strFromUTF8WithSub()
564 *pDest++=(UChar)ch; in u_strFromUTF8WithSub()
567 if(ch > 0xe0) { in u_strFromUTF8WithSub()
569 ch <= 0xec && in u_strFromUTF8WithSub()
574 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromUTF8WithSub()
578 } else if(ch < 0xe0) { in u_strFromUTF8WithSub()
580 ch >= 0xc2 && in u_strFromUTF8WithSub()
583 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromUTF8WithSub()
589 if(ch >= 0xf0 || subchar > 0xffff) { in u_strFromUTF8WithSub()
602 ch=utf8_nextCharSafeBodyPointer(&pSrc, pSrcLimit, ch); in u_strFromUTF8WithSub()
603 if(ch<0 && (++numSubstitutions, ch = subchar) < 0){ in u_strFromUTF8WithSub()
606 }else if(ch<=0xFFFF){ in u_strFromUTF8WithSub()
607 *(pDest++)=(UChar)ch; in u_strFromUTF8WithSub()
609 *(pDest++)=U16_LEAD(ch); in u_strFromUTF8WithSub()
610 *(pDest++)=U16_TRAIL(ch); in u_strFromUTF8WithSub()
617 ch = *pSrc; in u_strFromUTF8WithSub()
618 if(ch <= 0x7f){ in u_strFromUTF8WithSub()
619 *pDest++=(UChar)ch; in u_strFromUTF8WithSub()
622 if(ch > 0xe0) { in u_strFromUTF8WithSub()
624 ch <= 0xec && in u_strFromUTF8WithSub()
630 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromUTF8WithSub()
634 } else if(ch < 0xe0) { in u_strFromUTF8WithSub()
636 ch >= 0xc2 && in u_strFromUTF8WithSub()
640 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromUTF8WithSub()
648 ch=utf8_nextCharSafeBodyPointer(&pSrc, pSrcLimit, ch); in u_strFromUTF8WithSub()
649 if(ch<0 && (++numSubstitutions, ch = subchar) < 0){ in u_strFromUTF8WithSub()
652 }else if(ch<=0xFFFF){ in u_strFromUTF8WithSub()
653 *(pDest++)=(UChar)ch; in u_strFromUTF8WithSub()
655 *(pDest++)=U16_LEAD(ch); in u_strFromUTF8WithSub()
657 *(pDest++)=U16_TRAIL(ch); in u_strFromUTF8WithSub()
667 ch = *pSrc; in u_strFromUTF8WithSub()
668 if(ch <= 0x7f){ in u_strFromUTF8WithSub()
672 if(ch > 0xe0) { in u_strFromUTF8WithSub()
674 ch <= 0xec && in u_strFromUTF8WithSub()
683 } else if(ch < 0xe0) { in u_strFromUTF8WithSub()
685 ch >= 0xc2 && in u_strFromUTF8WithSub()
697 ch=utf8_nextCharSafeBodyPointer(&pSrc, pSrcLimit, ch); in u_strFromUTF8WithSub()
698 if(ch<0 && (++numSubstitutions, ch = subchar) < 0){ in u_strFromUTF8WithSub()
702 reqLength+=U16_LENGTH(ch); in u_strFromUTF8WithSub()
745 UChar32 ch; in u_strFromUTF8Lenient() local
766 while(((ch = *pSrc) != 0) && (pDest < pDestLimit)) { in u_strFromUTF8Lenient()
767 if(ch < 0xc0) { in u_strFromUTF8Lenient()
773 *pDest++=(UChar)ch; in u_strFromUTF8Lenient()
776 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
779 *pDest++ = (UChar)((ch << 6) + t1 - 0x3080); in u_strFromUTF8Lenient()
783 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
787 *pDest++ = (UChar)((ch << 12) + (t1 << 6) + t2 - 0x2080); in u_strFromUTF8Lenient()
795 ch = (ch << 18) + (t1 << 12) + (t2 << 6) + t3 - 0x3c82080; in u_strFromUTF8Lenient()
796 *(pDest++) = U16_LEAD(ch); in u_strFromUTF8Lenient()
798 *(pDest++) = U16_TRAIL(ch); in u_strFromUTF8Lenient()
814 while((ch = *pSrc) != 0) { in u_strFromUTF8Lenient()
815 if(ch < 0xc0) { in u_strFromUTF8Lenient()
824 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
830 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
869 ch = *pSrc++; in u_strFromUTF8Lenient()
870 if(ch < 0xc0) { in u_strFromUTF8Lenient()
876 *pDest++=(UChar)ch; in u_strFromUTF8Lenient()
877 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
879 *pDest++ = (UChar)((ch << 6) + *pSrc++ - 0x3080); in u_strFromUTF8Lenient()
880 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
883 ch = (ch << 12) + (*pSrc++ << 6); in u_strFromUTF8Lenient()
884 *pDest++ = (UChar)(ch + *pSrc++ - 0x2080); in u_strFromUTF8Lenient()
887 ch = (ch << 18) + (*pSrc++ << 12); in u_strFromUTF8Lenient()
888 ch += *pSrc++ << 6; in u_strFromUTF8Lenient()
889 ch += *pSrc++ - 0x3c82080; in u_strFromUTF8Lenient()
890 *(pDest++) = U16_LEAD(ch); in u_strFromUTF8Lenient()
891 *(pDest++) = U16_TRAIL(ch); in u_strFromUTF8Lenient()
899 ch = *pSrc++; in u_strFromUTF8Lenient()
900 if(ch < 0xc0) { in u_strFromUTF8Lenient()
906 *pDest++=(UChar)ch; in u_strFromUTF8Lenient()
908 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
911 *pDest++ = (UChar)((ch << 6) + *pSrc++ - 0x3080); in u_strFromUTF8Lenient()
914 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
918 ch = (ch << 12) + (*pSrc++ << 6); in u_strFromUTF8Lenient()
919 *pDest++ = (UChar)(ch + *pSrc++ - 0x2080); in u_strFromUTF8Lenient()
926 ch = (ch << 18) + (*pSrc++ << 12); in u_strFromUTF8Lenient()
927 ch += *pSrc++ << 6; in u_strFromUTF8Lenient()
928 ch += *pSrc++ - 0x3c82080; in u_strFromUTF8Lenient()
929 *(pDest++) = U16_LEAD(ch); in u_strFromUTF8Lenient()
930 *(pDest++) = U16_TRAIL(ch); in u_strFromUTF8Lenient()
985 uint32_t ch=0,ch2=0; in u_strToUTF8WithSub() local
1009 while((ch=*pSrc)!=0) { in u_strToUTF8WithSub()
1011 if(ch <= 0x7f) { in u_strToUTF8WithSub()
1013 *pDest++ = (uint8_t)ch; in u_strToUTF8WithSub()
1018 } else if(ch <= 0x7ff) { in u_strToUTF8WithSub()
1020 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToUTF8WithSub()
1021 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1026 } else if(ch <= 0xd7ff || ch >= 0xe000) { in u_strToUTF8WithSub()
1028 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToUTF8WithSub()
1029 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
1030 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1039 if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
1041 ch=U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF8WithSub()
1043 ch=subchar; in u_strToUTF8WithSub()
1051 length = U8_LENGTH(ch); in u_strToUTF8WithSub()
1054 pDest=_appendUTF8(pDest, ch); in u_strToUTF8WithSub()
1061 while((ch=*pSrc++)!=0) { in u_strToUTF8WithSub()
1062 if(ch<=0x7f) { in u_strToUTF8WithSub()
1064 } else if(ch<=0x7ff) { in u_strToUTF8WithSub()
1066 } else if(!U16_IS_SURROGATE(ch)) { in u_strToUTF8WithSub()
1068 } else if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
1105 ch=*pSrc++; in u_strToUTF8WithSub()
1106 if(ch <= 0x7f) { in u_strToUTF8WithSub()
1107 *pDest++ = (uint8_t)ch; in u_strToUTF8WithSub()
1108 } else if(ch <= 0x7ff) { in u_strToUTF8WithSub()
1109 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToUTF8WithSub()
1110 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1111 } else if(ch <= 0xd7ff || ch >= 0xe000) { in u_strToUTF8WithSub()
1112 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToUTF8WithSub()
1113 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
1114 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1126 if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
1128 ch=U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF8WithSub()
1131 *pDest++=(uint8_t)((ch>>18)|0xf0); in u_strToUTF8WithSub()
1132 *pDest++=(uint8_t)(((ch>>12)&0x3f)|0x80); in u_strToUTF8WithSub()
1133 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
1134 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1138 ch=subchar; in u_strToUTF8WithSub()
1146 pDest=_appendUTF8(pDest, ch); in u_strToUTF8WithSub()
1153 ch=*pSrc++; in u_strToUTF8WithSub()
1154 if(ch <= 0x7f) { in u_strToUTF8WithSub()
1156 *pDest++ = (uint8_t)ch; in u_strToUTF8WithSub()
1161 } else if(ch <= 0x7ff) { in u_strToUTF8WithSub()
1163 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToUTF8WithSub()
1164 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1169 } else if(ch <= 0xd7ff || ch >= 0xe000) { in u_strToUTF8WithSub()
1171 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToUTF8WithSub()
1172 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
1173 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
1181 if(U16_IS_SURROGATE_LEAD(ch) && pSrc<pSrcLimit && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
1183 ch=U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF8WithSub()
1185 ch=subchar; in u_strToUTF8WithSub()
1193 length = U8_LENGTH(ch); in u_strToUTF8WithSub()
1196 pDest=_appendUTF8(pDest, ch); in u_strToUTF8WithSub()
1204 ch=*pSrc++; in u_strToUTF8WithSub()
1205 if(ch<=0x7f) { in u_strToUTF8WithSub()
1207 } else if(ch<=0x7ff) { in u_strToUTF8WithSub()
1209 } else if(!U16_IS_SURROGATE(ch)) { in u_strToUTF8WithSub()
1211 } else if(U16_IS_SURROGATE_LEAD(ch) && pSrc<pSrcLimit && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
1265 UChar32 ch; in u_strFromJavaModifiedUTF8WithSub() local
1295 while(((ch = *pSrc) != 0) && ch <= 0x7f && (pDest < pDestLimit)) { in u_strFromJavaModifiedUTF8WithSub()
1296 *pDest++=(UChar)ch; in u_strFromJavaModifiedUTF8WithSub()
1299 if(ch == 0) { in u_strFromJavaModifiedUTF8WithSub()
1321 while(pSrc < pSrcLimit && (ch = *pSrc) <= 0x7f) { in u_strFromJavaModifiedUTF8WithSub()
1322 *pDest++=(UChar)ch; in u_strFromJavaModifiedUTF8WithSub()
1345 ch = *pSrc; in u_strFromJavaModifiedUTF8WithSub()
1346 if(ch <= 0x7f){ in u_strFromJavaModifiedUTF8WithSub()
1347 *pDest++=(UChar)ch; in u_strFromJavaModifiedUTF8WithSub()
1350 if(ch >= 0xe0) { in u_strFromJavaModifiedUTF8WithSub()
1352 ch <= 0xef && in u_strFromJavaModifiedUTF8WithSub()
1357 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromJavaModifiedUTF8WithSub()
1363 ch >= 0xc0 && in u_strFromJavaModifiedUTF8WithSub()
1366 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromJavaModifiedUTF8WithSub()
1384 utf8_nextCharSafeBodyPointer(&pSrc, pSrcLimit, ch); in u_strFromJavaModifiedUTF8WithSub()
1398 ch = *pSrc; in u_strFromJavaModifiedUTF8WithSub()
1399 if(ch <= 0x7f){ in u_strFromJavaModifiedUTF8WithSub()
1400 *pDest++=(UChar)ch; in u_strFromJavaModifiedUTF8WithSub()
1403 if(ch >= 0xe0) { in u_strFromJavaModifiedUTF8WithSub()
1405 ch <= 0xef && in u_strFromJavaModifiedUTF8WithSub()
1411 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromJavaModifiedUTF8WithSub()
1417 ch >= 0xc0 && in u_strFromJavaModifiedUTF8WithSub()
1421 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromJavaModifiedUTF8WithSub()
1433 utf8_nextCharSafeBodyPointer(&pSrc, pSrcLimit, ch); in u_strFromJavaModifiedUTF8WithSub()
1452 ch = *pSrc; in u_strFromJavaModifiedUTF8WithSub()
1453 if(ch <= 0x7f) { in u_strFromJavaModifiedUTF8WithSub()
1457 if(ch >= 0xe0) { in u_strFromJavaModifiedUTF8WithSub()
1459 ch <= 0xef && in u_strFromJavaModifiedUTF8WithSub()
1470 ch >= 0xc0 && in u_strFromJavaModifiedUTF8WithSub()
1486 utf8_nextCharSafeBodyPointer(&pSrc, pSrcLimit, ch); in u_strFromJavaModifiedUTF8WithSub()
1488 reqLength+=U16_LENGTH(ch); in u_strFromJavaModifiedUTF8WithSub()
1516 uint32_t ch=0; in u_strToJavaModifiedUTF8() local
1535 while((ch=*src)<=0x7f && ch != 0 && pDest<pDestLimit) { in u_strToJavaModifiedUTF8()
1536 *pDest++ = (uint8_t)ch; in u_strToJavaModifiedUTF8()
1539 if(ch == 0) { in u_strToJavaModifiedUTF8()
1561 while(src < pSrcLimit && (ch = *src) <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1562 *pDest++=(uint8_t)ch; in u_strToJavaModifiedUTF8()
1585 ch=*src++; in u_strToJavaModifiedUTF8()
1586 if(ch <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1587 *pDest++ = (uint8_t)ch; in u_strToJavaModifiedUTF8()
1588 } else if(ch <= 0x7ff) { in u_strToJavaModifiedUTF8()
1589 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToJavaModifiedUTF8()
1590 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1592 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToJavaModifiedUTF8()
1593 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1594 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1600 ch=*src++; in u_strToJavaModifiedUTF8()
1601 if(ch <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1603 *pDest++ = (uint8_t)ch; in u_strToJavaModifiedUTF8()
1608 } else if(ch <= 0x7ff) { in u_strToJavaModifiedUTF8()
1610 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToJavaModifiedUTF8()
1611 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1618 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToJavaModifiedUTF8()
1619 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1620 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1628 ch=*src++; in u_strToJavaModifiedUTF8()
1629 if(ch <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1631 } else if(ch<=0x7ff) { in u_strToJavaModifiedUTF8()