Fix concatenating of surrogates.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
This commit is contained in:
Andrey Shitov authored and Evgeny Gavrin committed 2015-07-10 10:23:20 +03:00
1 parent 9fc1958903
commit dbf3708255
4 files changed
+104 -11

No files matched your search

+6
View File
@@ -73,6 +73,12 @@
#define LIT_UTF8_4_BYTE_CODE_POINT_MIN (0x10000)
#define LIT_UTF8_4_BYTE_CODE_POINT_MAX (LIT_UNICODE_CODE_POINT_MAX)
/**
* Differnce between byte count needed to represent code point greater than 0xFFFF
* in common UTF-8 (4 bytes required) and CESU-8 (6 bytes required)
*/
#define LIT_UTF8_CESU8_SURROGATE_SIZE_DIF (2 * LIT_UTF8_MAX_BYTES_IN_CODE_UNIT - LIT_UTF8_MAX_BYTES_IN_CODE_POINT)
/**
* Width of the offset field in lit_utf8_iterator_pos_t structure
*/