Lines Matching +full:8 +full:- +full:ch

99  * Convert an UTF-8 string to an UCS4 string.
101 * @param in an UTF-8 string to convert.
140 * Calculate the length of from converting a UTF-8 string to a UCS4
143 * @param in an UTF-8 string to convert.
160 * Convert an UCS4 string to a UTF-8 string.
165 * @param out the resulting UTF-8 strint, must be at least
181 uint32_t ch; in wind_ucs4utf8() local
185 ch = in[i]; in wind_ucs4utf8()
187 if (ch < 0x80) { in wind_ucs4utf8()
189 } else if (ch < 0x800) { in wind_ucs4utf8()
191 } else if (ch < 0x10000) { in wind_ucs4utf8()
193 } else if (ch <= 0x10FFFF) { in wind_ucs4utf8()
206 out[3] = (ch | 0x80) & 0xbf; in wind_ucs4utf8()
207 ch = ch >> 6; in wind_ucs4utf8()
209 out[2] = (ch | 0x80) & 0xbf; in wind_ucs4utf8()
210 ch = ch >> 6; in wind_ucs4utf8()
212 out[1] = (ch | 0x80) & 0xbf; in wind_ucs4utf8()
213 ch = ch >> 6; in wind_ucs4utf8()
215 out[0] = ch | first_char[len - 1]; in wind_ucs4utf8()
230 * Calculate the length of from converting a UCS4 string to an UTF-8 string.
234 * @param out_len the length of the resulting UTF-8 string.
284 uint16_t bom = (p[0] << 8) + p[1]; in wind_ucs2read()
288 len -= 2; in wind_ucs2read()
301 *out = (p[1] << 8) + p[0]; in wind_ucs2read()
303 *out = (p[0] << 8) + p[1]; in wind_ucs2read()
304 out++; p += 2; len -= 2; olen--; in wind_ucs2read()
306 *out_len -= olen; in wind_ucs2read()
350 p[1] = (bom >> 8) & 0xff; in wind_ucs2write()
353 p[0] = (bom >> 8) & 0xff; in wind_ucs2write()
355 len -= 2; in wind_ucs2write()
364 p[1] = (in[0] >> 8) & 0xff; in wind_ucs2write()
367 p[0] = (in[0] >> 8) & 0xff; in wind_ucs2write()
369 len -= 2; in wind_ucs2write()
370 in_len--; in wind_ucs2write()
374 *out_len -= len; in wind_ucs2write()
380 * Convert an UTF-8 string to an UCS2 string.
382 * @param in an UTF-8 string to convert.
424 * Calculate the length of from converting a UTF-8 string to a UCS2
427 * @param in an UTF-8 string to convert.
441 * Convert an UCS2 string to a UTF-8 string.
445 * @param out the resulting UTF-8 strint, must be at least
460 uint16_t ch; in wind_ucs2utf8() local
464 ch = in[i]; in wind_ucs2utf8()
466 if (ch < 0x80) { in wind_ucs2utf8()
468 } else if (ch < 0x800) { in wind_ucs2utf8()
481 out[2] = (ch | 0x80) & 0xbf; in wind_ucs2utf8()
482 ch = ch >> 6; in wind_ucs2utf8()
484 out[1] = (ch | 0x80) & 0xbf; in wind_ucs2utf8()
485 ch = ch >> 6; in wind_ucs2utf8()
487 out[0] = ch | first_char[len - 1]; in wind_ucs2utf8()
502 * Calculate the length of from converting a UCS2 string to an UTF-8 string.
506 * @param out_len the length of the resulting UTF-8 string.