Lines Matching refs:ch
48 UChar32 ch; in u_strFromUTF32WithSub() local
77 while((ch=*src) != 0 && in u_strFromUTF32WithSub()
78 ((uint32_t)ch < 0xd800 || (0xe000 <= ch && ch <= 0xffff))) { in u_strFromUTF32WithSub()
81 *pDest++ = (UChar)ch; in u_strFromUTF32WithSub()
87 if(ch != 0) { in u_strFromUTF32WithSub()
97 ch = *src++; in u_strFromUTF32WithSub()
100 if((uint32_t)ch < 0xd800 || (0xe000 <= ch && ch <= 0xffff)) { in u_strFromUTF32WithSub()
102 *pDest++ = (UChar)ch; in u_strFromUTF32WithSub()
107 } else if(0x10000 <= ch && ch <= 0x10ffff) { in u_strFromUTF32WithSub()
109 *pDest++ = U16_LEAD(ch); in u_strFromUTF32WithSub()
110 *pDest++ = U16_TRAIL(ch); in u_strFromUTF32WithSub()
115 } else if((ch = subchar) < 0) { in u_strFromUTF32WithSub()
162 UChar32 ch; in u_strToUTF32WithSub() local
192 while((ch=*src) != 0 && !U16_IS_SURROGATE(ch)) { in u_strToUTF32WithSub()
195 *pDest++ = ch; in u_strToUTF32WithSub()
201 if(ch != 0) { in u_strToUTF32WithSub()
211 ch = *src++; in u_strToUTF32WithSub()
212 if(!U16_IS_SURROGATE(ch)) { in u_strToUTF32WithSub()
214 } else if(U16_IS_SURROGATE_LEAD(ch) && src < srcLimit && U16_IS_TRAIL(ch2 = *src)) { in u_strToUTF32WithSub()
216 ch = U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF32WithSub()
217 } else if((ch = subchar) < 0) { in u_strToUTF32WithSub()
225 *pDest++ = ch; in u_strToUTF32WithSub()
561 UChar32 ch; in u_strFromUTF8Lenient() local
582 while(((ch = *pSrc) != 0) && (pDest < pDestLimit)) { in u_strFromUTF8Lenient()
583 if(ch < 0xc0) { in u_strFromUTF8Lenient()
589 *pDest++=(UChar)ch; in u_strFromUTF8Lenient()
592 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
595 *pDest++ = (UChar)((ch << 6) + t1 - 0x3080); in u_strFromUTF8Lenient()
599 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
603 *pDest++ = (UChar)((ch << 12) + (t1 << 6) + t2 - 0x2080); in u_strFromUTF8Lenient()
611 ch = (ch << 18) + (t1 << 12) + (t2 << 6) + t3 - 0x3c82080; in u_strFromUTF8Lenient()
612 *(pDest++) = U16_LEAD(ch); in u_strFromUTF8Lenient()
614 *(pDest++) = U16_TRAIL(ch); in u_strFromUTF8Lenient()
630 while((ch = *pSrc) != 0) { in u_strFromUTF8Lenient()
631 if(ch < 0xc0) { in u_strFromUTF8Lenient()
640 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
646 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
685 ch = *pSrc++; in u_strFromUTF8Lenient()
686 if(ch < 0xc0) { in u_strFromUTF8Lenient()
692 *pDest++=(UChar)ch; in u_strFromUTF8Lenient()
693 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
695 *pDest++ = (UChar)((ch << 6) + *pSrc++ - 0x3080); in u_strFromUTF8Lenient()
696 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
699 ch = (ch << 12) + (*pSrc++ << 6); in u_strFromUTF8Lenient()
700 *pDest++ = (UChar)(ch + *pSrc++ - 0x2080); in u_strFromUTF8Lenient()
703 ch = (ch << 18) + (*pSrc++ << 12); in u_strFromUTF8Lenient()
704 ch += *pSrc++ << 6; in u_strFromUTF8Lenient()
705 ch += *pSrc++ - 0x3c82080; in u_strFromUTF8Lenient()
706 *(pDest++) = U16_LEAD(ch); in u_strFromUTF8Lenient()
707 *(pDest++) = U16_TRAIL(ch); in u_strFromUTF8Lenient()
715 ch = *pSrc++; in u_strFromUTF8Lenient()
716 if(ch < 0xc0) { in u_strFromUTF8Lenient()
722 *pDest++=(UChar)ch; in u_strFromUTF8Lenient()
724 } else if(ch < 0xe0) { /* U+0080..U+07FF */ in u_strFromUTF8Lenient()
727 *pDest++ = (UChar)((ch << 6) + *pSrc++ - 0x3080); in u_strFromUTF8Lenient()
730 } else if(ch < 0xf0) { /* U+0800..U+FFFF */ in u_strFromUTF8Lenient()
734 ch = (ch << 12) + (*pSrc++ << 6); in u_strFromUTF8Lenient()
735 *pDest++ = (UChar)(ch + *pSrc++ - 0x2080); in u_strFromUTF8Lenient()
742 ch = (ch << 18) + (*pSrc++ << 12); in u_strFromUTF8Lenient()
743 ch += *pSrc++ << 6; in u_strFromUTF8Lenient()
744 ch += *pSrc++ - 0x3c82080; in u_strFromUTF8Lenient()
745 *(pDest++) = U16_LEAD(ch); in u_strFromUTF8Lenient()
746 *(pDest++) = U16_TRAIL(ch); in u_strFromUTF8Lenient()
801 uint32_t ch=0,ch2=0; in u_strToUTF8WithSub() local
825 while((ch=*pSrc)!=0) { in u_strToUTF8WithSub()
827 if(ch <= 0x7f) { in u_strToUTF8WithSub()
829 *pDest++ = (uint8_t)ch; in u_strToUTF8WithSub()
834 } else if(ch <= 0x7ff) { in u_strToUTF8WithSub()
836 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToUTF8WithSub()
837 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
842 } else if(ch <= 0xd7ff || ch >= 0xe000) { in u_strToUTF8WithSub()
844 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToUTF8WithSub()
845 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
846 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
855 if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
857 ch=U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF8WithSub()
859 ch=subchar; in u_strToUTF8WithSub()
867 length = U8_LENGTH(ch); in u_strToUTF8WithSub()
870 pDest=_appendUTF8(pDest, ch); in u_strToUTF8WithSub()
877 while((ch=*pSrc++)!=0) { in u_strToUTF8WithSub()
878 if(ch<=0x7f) { in u_strToUTF8WithSub()
880 } else if(ch<=0x7ff) { in u_strToUTF8WithSub()
882 } else if(!U16_IS_SURROGATE(ch)) { in u_strToUTF8WithSub()
884 } else if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
921 ch=*pSrc++; in u_strToUTF8WithSub()
922 if(ch <= 0x7f) { in u_strToUTF8WithSub()
923 *pDest++ = (uint8_t)ch; in u_strToUTF8WithSub()
924 } else if(ch <= 0x7ff) { in u_strToUTF8WithSub()
925 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToUTF8WithSub()
926 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
927 } else if(ch <= 0xd7ff || ch >= 0xe000) { in u_strToUTF8WithSub()
928 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToUTF8WithSub()
929 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
930 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
942 if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
944 ch=U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF8WithSub()
947 *pDest++=(uint8_t)((ch>>18)|0xf0); in u_strToUTF8WithSub()
948 *pDest++=(uint8_t)(((ch>>12)&0x3f)|0x80); in u_strToUTF8WithSub()
949 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
950 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
954 ch=subchar; in u_strToUTF8WithSub()
962 pDest=_appendUTF8(pDest, ch); in u_strToUTF8WithSub()
969 ch=*pSrc++; in u_strToUTF8WithSub()
970 if(ch <= 0x7f) { in u_strToUTF8WithSub()
972 *pDest++ = (uint8_t)ch; in u_strToUTF8WithSub()
977 } else if(ch <= 0x7ff) { in u_strToUTF8WithSub()
979 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToUTF8WithSub()
980 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
985 } else if(ch <= 0xd7ff || ch >= 0xe000) { in u_strToUTF8WithSub()
987 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToUTF8WithSub()
988 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToUTF8WithSub()
989 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToUTF8WithSub()
997 if(U16_IS_SURROGATE_LEAD(ch) && pSrc<pSrcLimit && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
999 ch=U16_GET_SUPPLEMENTARY(ch, ch2); in u_strToUTF8WithSub()
1001 ch=subchar; in u_strToUTF8WithSub()
1009 length = U8_LENGTH(ch); in u_strToUTF8WithSub()
1012 pDest=_appendUTF8(pDest, ch); in u_strToUTF8WithSub()
1020 ch=*pSrc++; in u_strToUTF8WithSub()
1021 if(ch<=0x7f) { in u_strToUTF8WithSub()
1023 } else if(ch<=0x7ff) { in u_strToUTF8WithSub()
1025 } else if(!U16_IS_SURROGATE(ch)) { in u_strToUTF8WithSub()
1027 } else if(U16_IS_SURROGATE_LEAD(ch) && pSrc<pSrcLimit && U16_IS_TRAIL(ch2=*pSrc)) { in u_strToUTF8WithSub()
1123 UChar32 ch; in u_strFromJavaModifiedUTF8WithSub() local
1160 ch = (uint8_t)src[i++]; in u_strFromJavaModifiedUTF8WithSub()
1161 if(U8_IS_SINGLE(ch)) { in u_strFromJavaModifiedUTF8WithSub()
1162 *pDest++=(UChar)ch; in u_strFromJavaModifiedUTF8WithSub()
1164 if(ch >= 0xe0) { in u_strFromJavaModifiedUTF8WithSub()
1166 ch <= 0xef && in u_strFromJavaModifiedUTF8WithSub()
1171 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromJavaModifiedUTF8WithSub()
1177 ch >= 0xc0 && in u_strFromJavaModifiedUTF8WithSub()
1180 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromJavaModifiedUTF8WithSub()
1198 utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1); in u_strFromJavaModifiedUTF8WithSub()
1207 ch = (uint8_t)src[i++]; in u_strFromJavaModifiedUTF8WithSub()
1208 if(U8_IS_SINGLE(ch)){ in u_strFromJavaModifiedUTF8WithSub()
1209 *pDest++=(UChar)ch; in u_strFromJavaModifiedUTF8WithSub()
1211 if(ch >= 0xe0) { in u_strFromJavaModifiedUTF8WithSub()
1213 ch <= 0xef && in u_strFromJavaModifiedUTF8WithSub()
1219 *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2); in u_strFromJavaModifiedUTF8WithSub()
1225 ch >= 0xc0 && in u_strFromJavaModifiedUTF8WithSub()
1229 *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1); in u_strFromJavaModifiedUTF8WithSub()
1240 utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1); in u_strFromJavaModifiedUTF8WithSub()
1259 ch = (uint8_t)src[i++]; in u_strFromJavaModifiedUTF8WithSub()
1260 if(U8_IS_SINGLE(ch)) { in u_strFromJavaModifiedUTF8WithSub()
1263 if(ch >= 0xe0) { in u_strFromJavaModifiedUTF8WithSub()
1265 ch <= 0xef && in u_strFromJavaModifiedUTF8WithSub()
1276 ch >= 0xc0 && in u_strFromJavaModifiedUTF8WithSub()
1291 utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1); in u_strFromJavaModifiedUTF8WithSub()
1293 reqLength+=U16_LENGTH(ch); in u_strFromJavaModifiedUTF8WithSub()
1321 uint32_t ch=0; in u_strToJavaModifiedUTF8() local
1340 while((ch=*src)<=0x7f && ch != 0 && pDest<pDestLimit) { in u_strToJavaModifiedUTF8()
1341 *pDest++ = (uint8_t)ch; in u_strToJavaModifiedUTF8()
1344 if(ch == 0) { in u_strToJavaModifiedUTF8()
1366 while(src < pSrcLimit && (ch = *src) <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1367 *pDest++=(uint8_t)ch; in u_strToJavaModifiedUTF8()
1390 ch=*src++; in u_strToJavaModifiedUTF8()
1391 if(ch <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1392 *pDest++ = (uint8_t)ch; in u_strToJavaModifiedUTF8()
1393 } else if(ch <= 0x7ff) { in u_strToJavaModifiedUTF8()
1394 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToJavaModifiedUTF8()
1395 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1397 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToJavaModifiedUTF8()
1398 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1399 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1405 ch=*src++; in u_strToJavaModifiedUTF8()
1406 if(ch <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1408 *pDest++ = (uint8_t)ch; in u_strToJavaModifiedUTF8()
1413 } else if(ch <= 0x7ff) { in u_strToJavaModifiedUTF8()
1415 *pDest++=(uint8_t)((ch>>6)|0xc0); in u_strToJavaModifiedUTF8()
1416 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1423 *pDest++=(uint8_t)((ch>>12)|0xe0); in u_strToJavaModifiedUTF8()
1424 *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1425 *pDest++=(uint8_t)((ch&0x3f)|0x80); in u_strToJavaModifiedUTF8()
1433 ch=*src++; in u_strToJavaModifiedUTF8()
1434 if(ch <= 0x7f && ch != 0) { in u_strToJavaModifiedUTF8()
1436 } else if(ch<=0x7ff) { in u_strToJavaModifiedUTF8()