tet_infoline(" UtcDaliTextCharacterSetConversionGetNumberOfUtf8Bytes");
unsigned int utf32_01[] = { 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 }; // Hello World
- unsigned int utf32_02[] = { 0x645, 0x631, 0x62D, 0x628, 0x627, 0x20, 0x628, 0x627, 0x644, 0x639, 0x627, 0x644, 0x645 }; // مرحبا بالعالم
- unsigned int utf32_03[] = { 0x939, 0x948, 0x932, 0x94B, 0x20, 0x935, 0x930, 0x94D, 0x932, 0x94D, 0x921 }; // हैलो वर्ल्ड
- unsigned int utf32_04[] = { 0x1F601, 0x20, 0x1F602, 0x20, 0x1F603, 0x20, 0x1F604 }; // Emojis
+ unsigned int utf32_02[] = { 0xA, 0x20, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0xA, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 }; // Hello World + CR and CR+LF
+ unsigned int utf32_03[] = { 0x645, 0x631, 0x62D, 0x628, 0x627, 0x20, 0x628, 0x627, 0x644, 0x639, 0x627, 0x644, 0x645 }; // مرحبا بالعالم
+ unsigned int utf32_04[] = { 0x939, 0x948, 0x932, 0x94B, 0x20, 0x935, 0x930, 0x94D, 0x932, 0x94D, 0x921 }; // हैलो वर्ल्ड
+ unsigned int utf32_05[] = { 0x1F601, 0x20, 0x1F602, 0x20, 0x1F603, 0x20, 0x1F604 }; // Emojis
const Utf8ToUtf32Data data[] =
{
utf32_01,
},
{
+ "Latin script with 'CR' and 'CR'+'LF'",
+ "\xd Hello\xd\xa World",
+ utf32_02,
+ },
+ {
"Arabic script",
"مرحبا بالعالم",
- utf32_02,
+ utf32_03,
},
{
"Devanagari script",
"हैलो वर्ल्ड",
- utf32_03,
+ utf32_04,
},
{
"Emojis",
"\xF0\x9F\x98\x81 \xF0\x9F\x98\x82 \xF0\x9F\x98\x83 \xF0\x9F\x98\x84",
- utf32_04,
+ utf32_05,
},
};
- const unsigned int numberOfTests = 4u;
+ const unsigned int numberOfTests = 5u;
for( unsigned int index = 0u; index < numberOfTests; ++index )
{
const std::string XHTML_GLOW_TAG("glow");
const std::string XHTML_OUTLINE_TAG("outline");
-const char LESS_THAN = '<';
-const char GREATER_THAN = '>';
-const char EQUAL = '=';
-const char QUOTATION_MARK = '\'';
-const char LINE_SEPARATOR_CR = 0x0D; // Carriage return character CR
-const char LINE_SEPARATOR_LF = 0x0A; // New line character LF
-const char SLASH = '/';
-const char BACK_SLASH = '\\';
+const char LESS_THAN = '<';
+const char GREATER_THAN = '>';
+const char EQUAL = '=';
+const char QUOTATION_MARK = '\'';
+const char SLASH = '/';
+const char BACK_SLASH = '\\';
-const char WHITE_SPACE = 0x20; // ASCII value of the white space.
+const char WHITE_SPACE = 0x20; // ASCII value of the white space.
const unsigned int MAX_NUM_OF_ATTRIBUTES = 5u; ///< The font tag has the 'family', 'size' 'weight', 'width' and 'slant' attrubutes.
const unsigned int DEFAULT_VECTOR_SIZE = 16u; ///< Default size of run vectors.
++markupStringBuffer;
}
}
- else if( ( LINE_SEPARATOR_CR == character ) && ( markupStringBuffer + 1u < markupStringEndBuffer ) )
- {
- // Replacing CR+LF end line by LF.
- if( LINE_SEPARATOR_LF == *( markupStringBuffer + 1u ) )
- {
- character = LINE_SEPARATOR_LF;
- ++markupStringBuffer;
- }
- }
const unsigned char numberOfBytes = GetUtf8Length( character );