Lines Matching defs:bytes
19 * - legacy variable-length codepages with up to 4 bytes per character
28 * - byte sequences must not have leading zero bytes
30 * - limitation to up to 4 bytes per character
161 * One format for transitional entries (bit 31 not set) for non-final bytes, and
279 * at least two states for the trail bytes:
292 * Converting from Unicode to codepage bytes --------------------------------***
296 * a sequence of 1..4 bytes, in addition to a flag that indicates if there is
302 * with the resulting bytes is at offsetFromUBytes.
333 * Bits 15..0 contain the index to stage 3, which must be multiplied by 16*(bytes per char)
335 * Stage 3 contains 2, 3, or 4 bytes per result.
336 * 2 or 4 bytes are stored as uint16_t/uint32_t in platform endianness,
337 * while 3 bytes are stored as bytes in big-endian order.
338 * Leading zero bytes are ignored, and the number of bytes is counted.
478 * consecutive sequences of bytes, starting from the one encoded in value,
481 * This function will not be called for sequences of bytes with leading zeros.
484 * @param value contains 1..4 bytes of the first byte sequence, right-aligned
779 const uint8_t *stage3, *bytes;
784 bytes=mbcsTable->fromUnicodeBytes;
808 stage3=bytes+st3Multiplier*16*(uint32_t)(uint16_t)st3;
815 * or which map to non-zero bytes if we use fallbacks.
994 char bytes[4];
1003 bytes[3]=(char)(0x30+linear%10); linear/=10;
1004 bytes[2]=(char)(0x81+linear%126); linear/=126;
1005 bytes[1]=(char)(0x30+linear%10); linear/=10;
1006 bytes[0]=(char)(0x81+linear);
1010 bytes, 4, (char **)target, (char *)targetLimit,
1118 const uint8_t *bytes;
1131 bytes=mbcsTable->fromUnicodeBytes;
1132 results=(const uint16_t *)bytes;
1159 EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
1167 EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
1175 * We _know_ the number of bytes in the fromUnicodeBytes array
1222 uprv_memcpy(newResults, bytes, sizeofFromUBytes);
1267 uint8_t *bytes, *p;
1272 bytes=(uint8_t *)mbcsTable->fromUnicodeBytes;
1312 p=bytes;
1315 /* write the codepage bytes into stage 3 */
1328 /* 2 bytes per character */
1342 uint32_t fullStage2Length, /* lengths are numbers of units, not bytes */
1528 * is a DBCS version of a base converter that also maps single bytes.
1691 /* calculate a bit set of 4 ASCII characters per bit that round-trip to ASCII bytes */
2331 uint8_t *bytes;
2380 bytes=cnv->toUBytes;
2432 bytes[0]=*(source-1);
2472 bytes[0]=*(source-1);
2508 bytes[byteIndex++]=*source++;
2511 entry=stateTable[state][bytes[byteIndex++]=*source++];
2675 * - If any of the non-initial bytes could be the start of a character,
2681 i<byteIndex && !isSingleOrLead(stateTable, state, isDBCSOnly, bytes[i]);
2684 /* Back out some bytes. */
2691 /* Back out bytes from the previous buffer: Need to replay them. */
2694 uprv_memcpy(cnv->preToU, bytes+i, -cnv->preToULength);
3001 uint8_t *bytes=cnv->toUBytes;
3004 *bytes++=*lastSource++;
3012 * - If any of the non-initial bytes could be the start of a character,
3016 uint8_t *bytes=cnv->toUBytes;
3017 *bytes++=*lastSource++; /* first byte */
3026 *bytes++=*lastSource++;
3268 const uint8_t *bytes;
3293 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3295 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
3344 value=DBCS_RESULT_FROM_MOST_BMP(mbcsIndex, (const uint16_t *)bytes, c);
3391 /* convert the Unicode code point in c into codepage bytes */
3394 /* get the bytes and the length for the output */
3396 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
3435 bytes from value and length */
3596 /* convert the Unicode code point in c into codepage bytes */
3601 /* assigned, write the output character bytes from value and length */
3790 /* convert the Unicode code point in c into codepage bytes */
3800 /* assigned, write the output character bytes from value and length */
3933 const uint8_t *p, *bytes;
3993 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3995 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
4076 /* get the bytes and the length for the output (copied from below and adapted for utf8Friendly data) */
4080 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4103 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4140 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4149 p=bytes+(value+(c&0x3f))*3;
4164 value=((const uint32_t *)bytes)[value +(c&0x3f)];
4180 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4199 p=bytes+(value+(c&0x3f))*3;
4201 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4276 /* convert the Unicode code point in c into codepage bytes */
4286 * a pointer to as many bytes as are stored per character.
4287 * The pointer points to the character's bytes in stage 3.
4292 * For 2-byte and 4-byte codepages, the bytes are stored as uint16_t
4294 * For 3-byte codepages, the bytes are always stored in big-endian order.
4297 * byte of their longest byte sequences, the first two bytes in
4298 * this third stage indicate with their 7th bits whether these bytes
4304 * Other than that, leading zero bytes are removed and the other
4305 * bytes output. A single zero byte may be output if the "assigned"
4312 /* get the bytes and the length for the output */
4315 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4334 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4372 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4382 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4393 value=MBCS_VALUE_4_FROM_STAGE_2(bytes, stage2Entry, c);
4405 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4420 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4422 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4492 /* write the output character bytes from value and length */
4661 * It converts one single Unicode code point into codepage bytes, encoded
4662 * as one 32-bit value. The function returns the number of bytes in *pValue:
4663 * 1..4 the number of bytes in *pValue
4667 * *pValue will contain the resulting bytes with the last byte in bits 7..0,
4689 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4700 /* get the bytes and the length for the output */
4764 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4837 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4920 * Do not go back into the bytes that will be read for finishing a partial
4935 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5062 if( toULength==toULimit && /* consumed all trail bytes */
5220 * Do not go back into the bytes that will be read for finishing a partial
5235 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5342 if( toULength==toULimit && /* consumed all trail bytes */
5372 /* get the bytes and the length for the output */
5385 /* write the output character bytes from value and length */
5488 /* all bytes that cause a state transition from state 0 are lead bytes */