Home | History | Annotate | Download | only in common

Lines Matching refs: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
159 * One format for transitional entries (bit 31 not set) for non-final bytes, and
277 * at least two states for the trail bytes:
290 * Converting from Unicode to codepage bytes --------------------------------***
294 * a sequence of 1..4 bytes, in addition to a flag that indicates if there is
300 * with the resulting bytes is at offsetFromUBytes.
331 * Bits 15..0 contain the index to stage 3, which must be multiplied by 16*(bytes per char)
333 * Stage 3 contains 2, 3, or 4 bytes per result.
334 * 2 or 4 bytes are stored as uint16_t/uint32_t in platform endianness,
335 * while 3 bytes are stored as bytes in big-endian order.
336 * Leading zero bytes are ignored, and the number of bytes is counted.
405 * consecutive sequences of bytes, starting from the one encoded in value,
408 * This function will not be called for sequences of bytes with leading zeros.
411 * @param value contains 1..4 bytes of the first byte sequence, right-aligned
706 const uint8_t *stage3, *bytes;
711 bytes=mbcsTable->fromUnicodeBytes;
735 stage3=bytes+st3Multiplier*16*(uint32_t)(uint16_t)st3;
742 * or which map to non-zero bytes if we use fallbacks.
921 char bytes[4];
930 bytes[3]=(char)(0x30+linear%10); linear/=10;
931 bytes[2]=(char)(0x81+linear%126); linear/=126;
932 bytes[1]=(char)(0x30+linear%10); linear/=10;
933 bytes[0]=(char)(0x81+linear);
937 bytes, 4, (char **)target, (char *)targetLimit,
1045 const uint8_t *bytes;
1058 bytes=mbcsTable->fromUnicodeBytes;
1059 results=(const uint16_t *)bytes;
1086 EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
1094 EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
1102 * We _know_ the number of bytes in the fromUnicodeBytes array
1149 uprv_memcpy(newResults, bytes, sizeofFromUBytes);
1194 uint8_t *bytes, *p;
1199 bytes=(uint8_t *)mbcsTable->fromUnicodeBytes;
1239 p=bytes;
1242 /* write the codepage bytes into stage 3 */
1255 /* 2 bytes per character */
1269 uint32_t fullStage2Length, /* lengths are numbers of units, not bytes */
1273 uint8_t *bytes;
1292 mbcsTable->fromUnicodeBytes=bytes=(uint8_t *)(stage2+fullStage2Length);
1456 * is a DBCS version of a base converter that also maps single bytes.
1619 /* calculate a bit set of 4 ASCII characters per bit that round-trip to ASCII bytes */
2250 uint8_t *bytes;
2299 bytes=cnv->toUBytes;
2351 bytes[0]=*(source-1);
2391 bytes[0]=*(source-1);
2427 bytes[byteIndex++]=*source++;
2430 entry=stateTable[state][bytes[byteIndex++]=*source++];
2594 * - If any of the non-initial bytes could be the start of a character,
2600 i<byteIndex && !isSingleOrLead(stateTable, state, isDBCSOnly, bytes[i]);
2603 /* Back out some bytes. */
2610 /* Back out bytes from the previous buffer: Need to replay them. */
2613 uprv_memcpy(cnv->preToU, bytes+i, -cnv->preToULength);
2920 uint8_t *bytes=cnv->toUBytes;
2923 *bytes++=*lastSource++;
2931 * - If any of the non-initial bytes could be the start of a character,
2935 uint8_t *bytes=cnv->toUBytes;
2936 *bytes++=*lastSource++; /* first byte */
2945 *bytes++=*lastSource++;
3187 const uint8_t *bytes;
3212 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3214 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
3263 value=DBCS_RESULT_FROM_MOST_BMP(mbcsIndex, (const uint16_t *)bytes, c);
3310 /* convert the Unicode code point in c into codepage bytes */
3313 /* get the bytes and the length for the output */
3315 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
3354 /* write the output character bytes from value and length */
3515 /* convert the Unicode code point in c into codepage bytes */
3520 /* assigned, write the output character bytes from value and length */
3709 /* convert the Unicode code point in c into codepage bytes */
3719 /* assigned, write the output character bytes from value and length */
3852 const uint8_t *p, *bytes;
3908 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3910 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
3987 /* get the bytes and the length for the output (copied from below and adapted for utf8Friendly data) */
3991 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4014 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4039 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4048 p=bytes+(value+(c&0x3f))*3;
4063 value=((const uint32_t *)bytes)[value +(c&0x3f)];
4079 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4098 p=bytes+(value+(c&0x3f))*3;
4100 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4175 /* convert the Unicode code point in c into codepage bytes */
4185 * a pointer to as many bytes as are stored per character.
4186 * The pointer points to the character's bytes in stage 3.
4191 * For 2-byte and 4-byte codepages, the bytes are stored as uint16_t
4193 * For 3-byte codepages, the bytes are always stored in big-endian order.
4196 * byte of their longest byte sequences, the first two bytes in
4197 * this third stage indicate with their 7th bits whether these bytes
4203 * Other than that, leading zero bytes are removed and the other
4204 * bytes output. A single zero byte may be output if the "assigned"
4211 /* get the bytes and the length for the output */
4214 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4233 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4259 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4269 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4280 value=MBCS_VALUE_4_FROM_STAGE_2(bytes, stage2Entry, c);
4292 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4307 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4309 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4379 /* write the output character bytes from value and length */
4536 * It converts one single Unicode code point into codepage bytes, encoded
4537 * as one 32-bit value. The function returns the number of bytes in *pValue:
4538 * 1..4 the number of bytes in *pValue
4542 * *pValue will contain the resulting bytes with the last byte in bits 7..0,
4564 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4575 /* get the bytes and the length for the output */
4639 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4712 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4795 * Do not go back into the bytes that will be read for finishing a partial
4810 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
4930 if( toULength==toULimit && /* consumed all trail bytes */
5092 * Do not go back into the bytes that will be read for finishing a partial
5107 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5207 if( toULength==toULimit && /* consumed all trail bytes */
5237 /* get the bytes and the length for the output */
5250 /* write the output character bytes from value and length */
5350 /* all bytes that cause a state transition from state 0 are lead bytes */