From 3341b08e23b98cc2fa125da4f04b24162a4009d1 Mon Sep 17 00:00:00 2001 From: saritarawat Date: Tue, 25 Jul 2017 12:53:48 +0530 Subject: [PATCH] Supported XHTML entitites(Named & Numeric(hex/decimal)) in Markup Language. Added additional functionalities in ProcessMarkupString function to support XHTML entities. New function has been added to get UTF 8 text from Named & Numeric entities Change-Id: Ie47cf9274cd56e0f9c8d2448f0e7e812176ed1ed --- .../dali-toolkit-internal/utc-Dali-Text-Markup.cpp | 79 +++++ dali-toolkit/internal/file.list | 3 +- dali-toolkit/internal/text/markup-processor.cpp | 177 ++++++++++- dali-toolkit/internal/text/xhtml-entities.cpp | 331 +++++++++++++++++++++ dali-toolkit/internal/text/xhtml-entities.h | 45 +++ .../images/text-controls/SpecialCharacter1.png | Bin 0 -> 1689 bytes .../images/text-controls/SpecialCharacters.png | Bin 0 -> 3681 bytes docs/content/images/text-controls/XHTML_entity.png | Bin 0 -> 4367 bytes .../markup-style.md | 52 ++++ 9 files changed, 675 insertions(+), 12 deletions(-) mode change 100644 => 100755 automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp mode change 100644 => 100755 dali-toolkit/internal/file.list mode change 100644 => 100755 dali-toolkit/internal/text/markup-processor.cpp create mode 100755 dali-toolkit/internal/text/xhtml-entities.cpp create mode 100755 dali-toolkit/internal/text/xhtml-entities.h create mode 100755 docs/content/images/text-controls/SpecialCharacter1.png create mode 100755 docs/content/images/text-controls/SpecialCharacters.png create mode 100755 docs/content/images/text-controls/XHTML_entity.png mode change 100644 => 100755 docs/content/shared-javascript-and-cpp-documentation/markup-style.md diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp old mode 100644 new mode 100755 index 87db667..7007170 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp @@ -166,6 +166,34 @@ namespace return true; } + /////////////////////////////////////////////////////////// + + + struct XHTMLEntityToUTF8Data + { + std::string description; + std::string xHTMLEntityString; + std::string expectedString; + }; + + bool XHTMLEntityToUTF8Test( const XHTMLEntityToUTF8Data& data ) + { + std::cout << " testing " << data.description << std::endl; + + Vector colorRuns; + Vector fontRuns; + MarkupProcessData markupProcessData( colorRuns, fontRuns ); + ProcessMarkupString( data.xHTMLEntityString, markupProcessData ); + + if( markupProcessData.markupProcessedText != data.expectedString ) + { + std::cout << " different output string : " << markupProcessData.markupProcessedText << ", expected : " << data.expectedString << " " << std::endl; + return false; + } + + return true; + } + } // namespace int UtcDaliTextTokenComparison(void) @@ -451,3 +479,54 @@ int UtcDaliTextVector2ToString(void) tet_result(TET_PASS); END_TEST; } + +int UtcDaliTextXHTMLEntityToUTF8(void) +{ + tet_infoline(" UtcDaliTextXHTMLEntityToUTF8"); + const XHTMLEntityToUTF8Data data[] = + { + { + "Text Without XHTML Entity", + "Checking XHTML Entitities", + "Checking XHTML Entitities" + }, + { + "Text With XHTML Entity in Numeric form", + "Checking Numeric Entitities & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • ", + "Checking Numeric Entitities & ' < > ¡ ¢ £ ¤ Â¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä Ã¥ æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • " + }, + { + "Text With XHTML Named Entities", + "Checking Named Entitities & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • ", + "Checking Named Entitities & ' < > ¡ ¢ £ ¤ Â¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä Ã¥ æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • " + }, + { + "Testing of < special character", + "Testing of < special character", + "Testing of " + }, + { + "Testing of & special character", + "Testing of & special character", + "Testing of " + }, + { + "Testing of & < > special character", + "Testing of \\& \\< \\> special character", + "Testing of & < > special character" + } + }; + const unsigned int numberOfTests = 6u; + + for( unsigned int index = 0u; index < numberOfTests; ++index ) + { + ToolkitTestApplication application; + if( !XHTMLEntityToUTF8Test( data[index] ) ) + { + tet_result(TET_FAIL); + } + } + + tet_result(TET_PASS); + END_TEST; +} diff --git a/dali-toolkit/internal/file.list b/dali-toolkit/internal/file.list old mode 100644 new mode 100755 index 6622d01..3fa035e --- a/dali-toolkit/internal/file.list +++ b/dali-toolkit/internal/file.list @@ -153,4 +153,5 @@ toolkit_src_files = \ $(toolkit_src_dir)/transition-effects/cube-transition-fold-effect-impl.cpp \ $(toolkit_src_dir)/transition-effects/cube-transition-wave-effect-impl.cpp \ $(toolkit_src_dir)/scripting/script-impl.cpp \ - $(toolkit_src_dir)/scripting/script-plugin-proxy.cpp + $(toolkit_src_dir)/scripting/script-plugin-proxy.cpp \ + $(toolkit_src_dir)/text/xhtml-entities.cpp diff --git a/dali-toolkit/internal/text/markup-processor.cpp b/dali-toolkit/internal/text/markup-processor.cpp old mode 100644 new mode 100755 index 6ea6352..5bbe5ad --- a/dali-toolkit/internal/text/markup-processor.cpp +++ b/dali-toolkit/internal/text/markup-processor.cpp @@ -18,11 +18,18 @@ // FILE HEADER #include +// EXTERNAL INCLUDES +#include // for ULONG_MAX +#include + // INTERNAL INCLUDES #include #include #include #include +#include + + namespace Dali { @@ -53,12 +60,26 @@ const char EQUAL = '='; const char QUOTATION_MARK = '\''; const char SLASH = '/'; const char BACK_SLASH = '\\'; +const char AMPERSAND = '&'; +const char HASH = '#'; +const char SEMI_COLON = ';'; +const char CHAR_ARRAY_END = '\0'; +const char HEX_CODE = 'x'; const char WHITE_SPACE = 0x20; // ASCII value of the white space. +// Range 1 0x0u < XHTML_DECIMAL_ENTITY_RANGE <= 0xD7FFu +// Range 2 0xE000u < XHTML_DECIMAL_ENTITY_RANGE <= 0xFFFDu +// Range 3 0x10000u < XHTML_DECIMAL_ENTITY_RANGE <= 0x10FFFFu +const unsigned long XHTML_DECIMAL_ENTITY_RANGE[] = { 0x0u, 0xD7FFu, 0xE000u, 0xFFFDu, 0x10000u, 0x10FFFFu }; + 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. +#if defined(DEBUG_ENABLED) +Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_MARKUP_PROCESSOR"); +#endif + /** * @brief Struct used to retrieve the style runs from the mark-up string. */ @@ -354,6 +375,88 @@ bool IsTag( const char*& markupStringBuffer, return isTag; } +/** + * @brief Returns length of XHTML entity by parsing the text. It also determines if it is XHTML entity or not. + * + * @param[in] markupStringBuffer The mark-up string buffer. It's a const iterator pointing the current character. + * @param[in] markupStringEndBuffer Pointing to end of mark-up string buffer. + * + * @return Length of markupText in case of XHTML entity otherwise return 0. + */ +unsigned int GetXHTMLEntityLength( const char*& markupStringBuffer, + const char* const markupStringEndBuffer ) +{ + char character = *markupStringBuffer; + if( AMPERSAND == character ) // '&' + { + // if the iterator is pointing to a '&' character, then check for ';' to find end to XHTML entity. + ++markupStringBuffer; + if( markupStringBuffer < markupStringEndBuffer ) + { + unsigned int len = 1u; + for( ; markupStringBuffer < markupStringEndBuffer ; ++markupStringBuffer ) + { + character = *markupStringBuffer; + ++len; + if( SEMI_COLON == character ) // ';' + { + // found end of XHTML entity + ++markupStringBuffer; + return len; + } + else if( ( AMPERSAND == character ) || ( BACK_SLASH == character ) || ( LESS_THAN == character )) + { + return 0; + } + } + } + } + return 0; +} + +/** + * @brief It parses a XHTML string which has hex/decimal entity and fill its corresponging utf-8 string. + * + * @param[in] markupText The mark-up text buffer. + * @param[out] utf-8 text Corresponding to markup Text + * + * @return true if string is successfully parsed otherwise false + */ +bool XHTMLNumericEntityToUtf8 ( const char* markupText, char* utf8 ) +{ + bool result = false; + + if( NULL != markupText ) + { + bool isHex = false; + + // check if hex or decimal entity + if( ( CHAR_ARRAY_END != *markupText ) && ( HEX_CODE == *markupText ) ) + { + isHex = true; + ++markupText; + } + + char* end = NULL; + unsigned long l = strtoul( markupText, &end, ( isHex ? 16 : 10 ) ); // l contains UTF-32 code in case of correct XHTML entity + + // check for valid XHTML numeric entities (between '#' or "#x" and ';') + if( ( l > 0 ) && ( l < ULONG_MAX ) && ( *end == SEMI_COLON ) ) // in case wrong XHTML entity is set eg. "abcdefs;" in that case *end will be 'a' + { + /* characters XML 1.1 permits */ + if( ( ( XHTML_DECIMAL_ENTITY_RANGE[0] < l ) && ( l <= XHTML_DECIMAL_ENTITY_RANGE[1] ) ) || + ( ( XHTML_DECIMAL_ENTITY_RANGE[2] <= l ) && ( l <= XHTML_DECIMAL_ENTITY_RANGE[3] ) ) || + ( ( XHTML_DECIMAL_ENTITY_RANGE[4] <= l ) && ( l <= XHTML_DECIMAL_ENTITY_RANGE[5] ) ) ) + { + // Convert UTF32 code to UTF8 + Utf32ToUtf8( reinterpret_cast( &l ), 1, reinterpret_cast( utf8 ) ); + result = true; + } + } + } + return result; +} + } // namespace void ProcessMarkupString( const std::string& markupString, MarkupProcessData& markupProcessData ) @@ -547,32 +650,84 @@ void ProcessMarkupString( const std::string& markupString, MarkupProcessData& ma } } // } // end if( IsTag() ) - else + else if( markupStringBuffer < markupStringEndBuffer ) { unsigned char character = *markupStringBuffer; + const char* markupBuffer = markupStringBuffer; + unsigned char count = GetUtf8Length( character ); + char utf8[8]; if( ( BACK_SLASH == character ) && ( markupStringBuffer + 1u < markupStringEndBuffer ) ) { - // Adding < or > special character. + // Adding < , > or & special character. const unsigned char nextCharacter = *( markupStringBuffer + 1u ); - if( ( LESS_THAN == nextCharacter ) || ( GREATER_THAN == nextCharacter ) ) + if( ( LESS_THAN == nextCharacter ) || ( GREATER_THAN == nextCharacter ) || ( AMPERSAND == nextCharacter ) ) { character = nextCharacter; ++markupStringBuffer; + + count = GetUtf8Length( character ); + markupBuffer = markupStringBuffer; } } + else // checking if conatins XHTML entity or not + { + const unsigned int len = GetXHTMLEntityLength( markupStringBuffer, markupStringEndBuffer); - const unsigned char numberOfBytes = GetUtf8Length( character ); + // Parse markupStringTxt if it contains XHTML Entity between '&' and ';' + if( len > 0 ) + { + char* entityCode = NULL; + bool result = false; + count = 0; - markupProcessData.markupProcessedText.push_back( character ); - for( unsigned char i = 1u; i < numberOfBytes; ++i ) - { - ++markupStringBuffer; - markupProcessData.markupProcessedText.push_back( *markupStringBuffer ); + // Checking if XHTML Numeric Entity + if( HASH == *( markupBuffer + 1u ) ) + { + entityCode = &utf8[0]; + // markupBuffer is currently pointing to '&'. By adding 2u to markupBuffer it will point to numeric string by skipping "&#' + result = XHTMLNumericEntityToUtf8( ( markupBuffer + 2u ), entityCode ); + } + else // Checking if XHTML Named Entity + { + entityCode = const_cast ( NamedEntityToUtf8( markupBuffer, len ) ); + result = ( entityCode != NULL ); + } + if ( result ) + { + markupBuffer = entityCode; //utf8 text assigned to markupBuffer + character = markupBuffer[0]; + } + else + { + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Not valid XHTML entity : (%.*s) \n", len, markupBuffer ); + markupBuffer = NULL; + } + } + else // in case string conatins Start of XHTML Entity('&') but not its end character(';') + { + if( character == AMPERSAND ) + { + markupBuffer = NULL; + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Not Well formed XHTML content \n" ); + } + } } - ++characterIndex; - ++markupStringBuffer; + if( markupBuffer != NULL ) + { + const unsigned char numberOfBytes = GetUtf8Length( character ); + markupProcessData.markupProcessedText.push_back( character ); + + for( unsigned char i = 1u; i < numberOfBytes; ++i ) + { + ++markupBuffer; + markupProcessData.markupProcessedText.push_back( *markupBuffer ); + } + + ++characterIndex; + markupStringBuffer += count; + } } } diff --git a/dali-toolkit/internal/text/xhtml-entities.cpp b/dali-toolkit/internal/text/xhtml-entities.cpp new file mode 100755 index 0000000..3ee7215 --- /dev/null +++ b/dali-toolkit/internal/text/xhtml-entities.cpp @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// EXTERNAL INCLUDES +#include // for strlen() + +// FILE HEADER +#include "xhtml-entities.h" + +namespace Dali +{ + +namespace Toolkit +{ + +namespace Text +{ + +namespace +{ +/** + * Implementation of the XHTML Entity matching + */ +struct XHTMLEntityLookup +{ + const char* const entityName; // XHTML Named Entity string + const char* const entityCode; // Corresponding UTF-8 +}; + +/* table of html name entities supported in DALi + * + * these are stored as pair with Named entity as Key and + * its utf 8 as value + */ +const XHTMLEntityLookup XHTMLEntityLookupTable[] = + { + { ""\0" ,"\x22\0" }, + { "&\0" ,"\x26\0" }, + { "'\0" ,"\x27\0" }, + { "<\0" ,"\x3c\0" }, + { ">\0" ,"\x3e\0" }, + { " \0" ,"\xc2\xa0\0" }, + { "¡\0" ,"\xc2\xa1\0" }, + { "¢\0" ,"\xc2\xa2\0" }, + { "£\0" ,"\xc2\xa3\0" }, + { "¤\0" ,"\xc2\xa4\0" }, + { "¥\0" ,"\xc2\xa5\0" }, + { "¦\0" ,"\xc2\xa6\0" }, + { "§\0" ,"\xc2\xa7\0" }, + { "¨\0" ,"\xc2\xa8\0" }, + { "©\0" ,"\xc2\xa9\0" }, + { "ª\0" ,"\xc2\xaa\0" }, + { "«\0" ,"\xc2\xab\0" }, + { "¬\0" ,"\xc2\xac\0" }, + { "­\0" ,"\xc2\xad\0" }, + { "®\0" ,"\xc2\xae\0" }, + { "¯\0" ,"\xc2\xaf\0" }, + { "°\0" ,"\xc2\xb0\0" }, + { "±\0" ,"\xc2\xb1\0" }, + { "²\0" ,"\xc2\xb2\0" }, + { "³\0" ,"\xc2\xb3\0" }, + { "´\0" ,"\xc2\xb4\0" }, + { "µ\0" ,"\xc2\xb5\0" }, + { "¶\0" ,"\xc2\xb6\0" }, + { "·\0" ,"\xc2\xb7\0" }, + { "¸\0" ,"\xc2\xb8\0" }, + { "¹\0" ,"\xc2\xb9\0" }, + { "º\0" ,"\xc2\xba\0" }, + { "»\0" ,"\xc2\xbb\0" }, + { "¼\0" ,"\xc2\xbc\0" }, + { "½\0" ,"\xc2\xbd\0" }, + { "¾\0" ,"\xc2\xbe\0" }, + { "¿\0" ,"\xc2\xbf\0" }, + { "À\0" ,"\xc3\x80\0" }, + { "Á\0" ,"\xc3\x81\0" }, + { "Â\0" ,"\xc3\x82\0" }, + { "Ã\0" ,"\xc3\x83\0" }, + { "Ä\0" ,"\xc3\x84\0" }, + { "Å\0" ,"\xc3\x85\0" }, + { "Æ\0" ,"\xc3\x86\0" }, + { "Ç\0" ,"\xc3\x87\0" }, + { "È\0" ,"\xc3\x88\0" }, + { "É\0" ,"\xc3\x89\0" }, + { "Ê\0" ,"\xc3\x8a\0" }, + { "Ë\0" ,"\xc3\x8b\0" }, + { "Ì\0" ,"\xc3\x8c\0" }, + { "Í\0" ,"\xc3\x8d\0" }, + { "Î\0" ,"\xc3\x8e\0" }, + { "Ï\0" ,"\xc3\x8f\0" }, + { "Ð\0" ,"\xc3\x90\0" }, + { "Ñ\0" ,"\xc3\x91\0" }, + { "Ò\0" ,"\xc3\x92\0" }, + { "Ó\0" ,"\xc3\x93\0" }, + { "Ô\0" ,"\xc3\x94\0" }, + { "Õ\0" ,"\xc3\x95\0" }, + { "Ö\0" ,"\xc3\x96\0" }, + { "×\0" ,"\xc3\x97\0" }, + { "Ø\0" ,"\xc3\x98\0" }, + { "Ù\0" ,"\xc3\x99\0" }, + { "Ú\0" ,"\xc3\x9a\0" }, + { "Û\0" ,"\xc3\x9b\0" }, + { "Ü\0" ,"\xc3\x9c\0" }, + { "Ý\0" ,"\xc3\x9d\0" }, + { "Þ\0" ,"\xc3\x9e\0" }, + { "ß\0" ,"\xc3\x9f\0" }, + { "à\0" ,"\xc3\xa0\0" }, + { "á\0" ,"\xc3\xa1\0" }, + { "â\0" ,"\xc3\xa2\0" }, + { "ã\0" ,"\xc3\xa3\0" }, + { "ä\0" ,"\xc3\xa4\0" }, + { "å\0" ,"\xc3\xa5\0" }, + { "æ\0" ,"\xc3\xa6\0" }, + { "ç\0" ,"\xc3\xa7\0" }, + { "è\0" ,"\xc3\xa8\0" }, + { "é\0" ,"\xc3\xa9\0" }, + { "ê\0" ,"\xc3\xaa\0" }, + { "ë\0" ,"\xc3\xab\0" }, + { "ì\0" ,"\xc3\xac\0" }, + { "í\0" ,"\xc3\xad\0" }, + { "î\0" ,"\xc3\xae\0" }, + { "ï\0" ,"\xc3\xaf\0" }, + { "ð\0" ,"\xc3\xb0\0" }, + { "ñ\0" ,"\xc3\xb1\0" }, + { "ò\0" ,"\xc3\xb2\0" }, + { "ó\0" ,"\xc3\xb3\0" }, + { "ô\0" ,"\xc3\xb4\0" }, + { "õ\0" ,"\xc3\xb5\0" }, + { "ö\0" ,"\xc3\xb6\0" }, + { "÷\0" ,"\xc3\xb7\0" }, + { "ø\0" ,"\xc3\xb8\0" }, + { "ù\0" ,"\xc3\xb9\0" }, + { "ú\0" ,"\xc3\xba\0" }, + { "û\0" ,"\xc3\xbb\0" }, + { "ü\0" ,"\xc3\xbc\0" }, + { "ý\0" ,"\xc3\xbd\0" }, + { "þ\0" ,"\xc3\xbe\0" }, + { "ÿ\0" ,"\xc3\xbf\0" }, + { "Œ\0" ,"\xc5\x92\0" }, + { "œ\0" ,"\xc5\x93\0" }, + { "Š\0" ,"\xc5\xa0\0" }, + { "š\0" ,"\xc5\xa1\0" }, + { "Ÿ\0" ,"\xc5\xb8\0" }, + { "ƒ\0" ,"\xc6\x92\0" }, + { "ˆ\0" ,"\xcb\x86\0" }, + { "˜\0" ,"\xcb\x9c\0" }, + { "Α\0" ,"\xce\x91\0" }, + { "Β\0" ,"\xce\x92\0" }, + { "Γ\0" ,"\xce\x93\0" }, + { "Δ\0" ,"\xce\x94\0" }, + { "Ε\0" ,"\xce\x95\0" }, + { "Ζ\0" ,"\xce\x96\0" }, + { "Η\0" ,"\xce\x97\0" }, + { "Θ\0" ,"\xce\x98\0" }, + { "Ι\0" ,"\xce\x99\0" }, + { "Κ\0" ,"\xce\x9a\0" }, + { "Λ\0" ,"\xce\x9b\0" }, + { "Μ\0" ,"\xce\x9c\0" }, + { "Ν\0" ,"\xce\x9d\0" }, + { "Ξ\0" ,"\xce\x9e\0" }, + { "Ο\0" ,"\xce\x9f\0" }, + { "Π\0" ,"\xce\xa0\0" }, + { "Ρ\0" ,"\xce\xa1\0" }, + { "Σ\0" ,"\xce\xa3\0" }, + { "Τ\0" ,"\xce\xa4\0" }, + { "Υ\0" ,"\xce\xa5\0" }, + { "Φ\0" ,"\xce\xa6\0" }, + { "Χ\0" ,"\xce\xa7\0" }, + { "Ψ\0" ,"\xce\xa8\0" }, + { "Ω\0" ,"\xce\xa9\0" }, + { "α\0" ,"\xce\xb1\0" }, + { "β\0" ,"\xce\xb2\0" }, + { "γ\0" ,"\xce\xb3\0" }, + { "δ\0" ,"\xce\xb4\0" }, + { "ε\0" ,"\xce\xb5\0" }, + { "ζ\0" ,"\xce\xb6\0" }, + { "η\0" ,"\xce\xb7\0" }, + { "θ\0" ,"\xce\xb8\0" }, + { "ι\0" ,"\xce\xb9\0" }, + { "κ\0" ,"\xce\xba\0" }, + { "λ\0" ,"\xce\xbb\0" }, + { "μ\0" ,"\xce\xbc\0" }, + { "ν\0" ,"\xce\xbd\0" }, + { "ξ\0" ,"\xce\xbe\0" }, + { "ο\0" ,"\xce\xbf\0" }, + { "π\0" ,"\xcf\x80\0" }, + { "ρ\0" ,"\xcf\x81\0" }, + { "ς\0" ,"\xcf\x82\0" }, + { "σ\0" ,"\xcf\x83\0" }, + { "τ\0" ,"\xcf\x84\0" }, + { "υ\0" ,"\xcf\x85\0" }, + { "φ\0" ,"\xcf\x86\0" }, + { "χ\0" ,"\xcf\x87\0" }, + { "ψ\0" ,"\xcf\x88\0" }, + { "ω\0" ,"\xcf\x89\0" }, + { "ϑ\0","\xcf\x91\0" }, + { "ϒ\0" ,"\xcf\x92\0" }, + { "ϖ\0" ,"\xcf\x96\0" }, + { " \0" ,"\xe2\x80\x82\0" }, + { " \0" ,"\xe2\x80\x83\0" }, + { " \0" ,"\xe2\x80\x89\0" }, + { "‌\0" ,"\xe2\x80\x8c\0" }, + { "‍\0" ,"\xe2\x80\x8d\0" }, + { "‎\0" ,"\xe2\x80\x8e\0" }, + { "‏\0" ,"\xe2\x80\x8f\0" }, + { "–\0" ,"\xe2\x80\x93\0" }, + { "—\0" ,"\xe2\x80\x94\0" }, + { "‘\0" ,"\xe2\x80\x98\0" }, + { "’\0" ,"\xe2\x80\x99\0" }, + { "‚\0" ,"\xe2\x80\x9a\0" }, + { "“\0" ,"\xe2\x80\x9c\0" }, + { "”\0" ,"\xe2\x80\x9d\0" }, + { "„\0" ,"\xe2\x80\x9e\0" }, + { "†\0" ,"\xe2\x80\xa0\0" }, + { "‡\0" ,"\xe2\x80\xa1\0" }, + { "•\0" ,"\xe2\x80\xa2\0" }, + { "…\0" ,"\xe2\x80\xa6\0" }, + { "‰\0" ,"\xe2\x80\xb0\0" }, + { "′\0" ,"\xe2\x80\xb2\0" }, + { "″\0" ,"\xe2\x80\xb3\0" }, + { "‹\0" ,"\xe2\x80\xb9\0" }, + { "›\0" ,"\xe2\x80\xba\0" }, + { "‾\0" ,"\xe2\x80\xbe\0" }, + { "⁄\0" ,"\xe2\x81\x84\0" }, + { "€\0" ,"\xe2\x82\xac\0" }, + { "ℑ\0" ,"\xe2\x84\x91\0" }, + { "℘\0" ,"\xe2\x84\x98\0" }, + { "ℜ\0" ,"\xe2\x84\x9c\0" }, + { "™\0" ,"\xe2\x84\xa2\0" }, + { "ℵ\0" ,"\xe2\x84\xb5\0" }, + { "←\0" ,"\xe2\x86\x90\0" }, + { "↑\0" ,"\xe2\x86\x91\0" }, + { "→\0" ,"\xe2\x86\x92\0" }, + { "↓\0" ,"\xe2\x86\x93\0" }, + { "↔\0" ,"\xe2\x86\x94\0" }, + { "↵\0" ,"\xe2\x86\xb5\0" }, + { "⇐\0" ,"\xe2\x87\x90\0" }, + { "⇑\0" ,"\xe2\x87\x91\0" }, + { "⇒\0" ,"\xe2\x87\x92\0" }, + { "⇓\0" ,"\xe2\x87\x93\0" }, + { "⇔\0" ,"\xe2\x87\x94\0" }, + { "∀\0" ,"\xe2\x88\x80\0" }, + { "∂\0" ,"\xe2\x88\x82\0" }, + { "∃\0" ,"\xe2\x88\x83\0" }, + { "∅\0" ,"\xe2\x88\x85\0" }, + { "∇\0" ,"\xe2\x88\x87\0" }, + { "∈\0" ,"\xe2\x88\x88\0" }, + { "∉\0" ,"\xe2\x88\x89\0" }, + { "∋\0" ,"\xe2\x88\x8b\0" }, + { "∏\0" ,"\xe2\x88\x8f\0" }, + { "∑\0" ,"\xe2\x88\x91\0" }, + { "−\0" ,"\xe2\x88\x92\0" }, + { "∗\0" ,"\xe2\x88\x97\0" }, + { "√\0" ,"\xe2\x88\x9a\0" }, + { "∝\0" ,"\xe2\x88\x9d\0" }, + { "∞\0" ,"\xe2\x88\x9e\0" }, + { "∠\0" ,"\xe2\x88\xa0\0" }, + { "∧\0" ,"\xe2\x88\xa7\0" }, + { "∨\0" ,"\xe2\x88\xa8\0" }, + { "∩\0" ,"\xe2\x88\xa9\0" }, + { "∪\0" ,"\xe2\x88\xaa\0" }, + { "∫\0" ,"\xe2\x88\xab\0" }, + { "∴\0" ,"\xe2\x88\xb4\0" }, + { "∼\0" ,"\xe2\x88\xbc\0" }, + { "≅\0" ,"\xe2\x89\x85\0" }, + { "≈\0" ,"\xe2\x89\x88\0" }, + { "≠\0" ,"\xe2\x89\xa0\0" }, + { "≡\0" ,"\xe2\x89\xa1\0" }, + { "≤\0" ,"\xe2\x89\xa4\0" }, + { "≥\0" ,"\xe2\x89\xa5\0" }, + { "⊂\0" ,"\xe2\x8a\x82\0" }, + { "⊃\0" ,"\xe2\x8a\x83\0" }, + { "⊄\0" ,"\xe2\x8a\x84\0" }, + { "⊆\0" ,"\xe2\x8a\x86\0" }, + { "⊇\0" ,"\xe2\x8a\x87\0" }, + { "⊕\0" ,"\xe2\x8a\x95\0" }, + { "⊗\0" ,"\xe2\x8a\x97\0" }, + { "⊥\0" ,"\xe2\x8a\xa5\0" }, + { "⋅\0" ,"\xe2\x8b\x85\0" }, + { "⌈\0" ,"\xe2\x8c\x88\0" }, + { "⌉\0" ,"\xe2\x8c\x89\0" }, + { "⌊\0" ,"\xe2\x8c\x8a\0" }, + { "⌋\0" ,"\xe2\x8c\x8b\0" }, + { "◊\0" ,"\xe2\x97\x8a\0" }, + { "♠\0" ,"\xe2\x99\xa0\0" }, + { "♣\0" ,"\xe2\x99\xa3\0" }, + { "♥\0" ,"\xe2\x99\xa5\0" }, + { "♦\0" ,"\xe2\x99\xa6\0" }, + { "⟨\0" ,"\xe2\x9f\xa8\0" }, + { "⟩\0" ,"\xe2\x9f\xa9\0" } +}; + +const std::size_t XHTMLENTITY_LOOKUP_COUNT = (sizeof( XHTMLEntityLookupTable))/ (sizeof(XHTMLEntityLookup)); + +} // unnamed namespace + +const char* const NamedEntityToUtf8( const char* const markupText, unsigned int len ) +{ + // finding if given XHTML named entity is supported or not + for( size_t i = 0; i < XHTMLENTITY_LOOKUP_COUNT ; ++i ) + { + unsigned int entityLen = strlen(XHTMLEntityLookupTable[i].entityName); + if( len == entityLen ) + { + if( strncmp( markupText, XHTMLEntityLookupTable[i].entityName, len ) == 0 ) // if named Entity found in table + { + return XHTMLEntityLookupTable[i].entityCode; + } + } + } + return NULL; +} + +} // namespace Text + +} // namespace Toolkit + +} // namespace Dali diff --git a/dali-toolkit/internal/text/xhtml-entities.h b/dali-toolkit/internal/text/xhtml-entities.h new file mode 100755 index 0000000..c09d5cd --- /dev/null +++ b/dali-toolkit/internal/text/xhtml-entities.h @@ -0,0 +1,45 @@ +#ifndef DALI_TOOLKIT_TEXT_XHTML_ENTITIES_H +#define DALI_TOOLKIT_TEXT_XHTML_ENTITIES_H + +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +namespace Dali +{ + +namespace Toolkit +{ + +namespace Text +{ +/** + * @brief Retrieves UTF8 entity code for corresponding XHTML named Entity. + * + * @param[in] markupText The XHTML named entity. + * @param[int] len Length of markupText. + * + * @return pointer to UTF8 entity code if namedEntity found in table otherwise NULL + */ +const char* const NamedEntityToUtf8( const char* const markupText, unsigned int len ); + +} // namespace Text + +} // namespace Toolkit + +} // namespace Dali + +#endif // DALI_TOOLKIT_TEXT_XHTML_ENTITIES_H diff --git a/docs/content/images/text-controls/SpecialCharacter1.png b/docs/content/images/text-controls/SpecialCharacter1.png new file mode 100755 index 0000000000000000000000000000000000000000..6515a8be1a4700212524b3ca747c630cdddbb536 GIT binary patch literal 1689 zcmZ`)Ycv}M6pnWiHPQ(sUWo}MYne6bRgI<-uXrZ&D6LScSQC#T=#(^)ST(8V8dQ}< z)!Q&F^{BLpVjb#H5zi{MCf-_Ym+kDF{o0TF-TVFd&Uel|_q$AYyn_;06AS)&mYQ+F3 z&7>8lA7%j9u<4W?LD*1xe5_U2(g!i+ z>BF&>ojvoUcMo?gUuW3^;WU;10TXryteX4__Jo?{;dS*P&>NsY#gO=Nm-jpCe2eiX zZE+zRFI1wCzSa;VuAn|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?rTz!EsNgA!%>1yAaG-eMiK z636e)=a?7P_1WEVYqoiR@}@OFnTq235)|{&&~Bzx^m*B@qK|S$8Wcuw^T|nyZi^r% z1x~0XoLns{>uuu5rIuB;O`@+?3aVDKNV22vms2ENX)Fv$tE zk3cLL(KUDm_&MiGKQ*@EbUOk{f3Yyzx;dnNw@=%W(`~x9^;+;79-oXiq%7vV;8)#l pQ#tC;RwbzA)pGw&@-34tSXMwmzcjr346eR~WQI^PNWCs1=3fCo-lqTn literal 0 HcmV?d00001 diff --git a/docs/content/images/text-controls/XHTML_entity.png b/docs/content/images/text-controls/XHTML_entity.png new file mode 100755 index 0000000000000000000000000000000000000000..b656a5f7bf6548682abdc87c6bcb3c2692a5a136 GIT binary patch literal 4367 zcmd5h_7&3-4de1q(bDe+BKfmvFeV6BXzSrm8KKK3HPrQYh0mnJOIVL714kJTd zOD3k%VvKLZ*;9;X=54KB#)~=F(mqRkc@$>QTo*Rl@iodR_&3*Br&NW?a-D|3bhKA1#qx-aUb#D&iD@_gwxj0L=1z@<&GxIW;9jTv_1nGE!e9r?F_ zQE&f9=#lyOGZKAwtL5Hu5Y*QVrzcS4m7WJ{mO7c1FY9>! zt$g}nqubQA}Am2V;^T8DA$_1gN zS%U)na4VS}e&9n6d_XB1YthTM<13s}-Qyy=z$x-%jjY>Sw|ZLr=rjmMbuT*DE_QX6 zc1Sy`26ddCiq(8hmmpu=Vjr(vn5waFz1$AyHa$N%>AcBT5py(*SiJ2C^^70ypU%Df z^Vac!5EK*^3!4anB!}jDP2q+_0`($tGnMWF|B6tMmNA=3UfAY3+jNs-k2_C+tQPhn zc=SM%{{v#K)m_JA*aFt>_T!Ih9&H&SGjR#6H%*1cHEa{FW;|4K8wTaz-d}K-y5i;b zU?|R{@Iw`3ImU@F+y4k0x_4eq0STDq{O1~S0}1i(Dut|lC`UUoWH~m z=jIF0>)zff4pN`?&7mK`so~u>I_<%b+Or#R_H>|;sT3gPhIYZi9^ZDBT-fWn`4qTc z<$#88#cf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sB$2GL)_fcIVQGQ>c3JVlz`Q?)+iPTL)dXfbfrR)qPc< zaK<64jFGp^J_S7EqVC}&E~T)8{6tMDg|eXPRKhbi6Y~?65XUaG#b!BSk51e5%r{zc zn%)n|{M{E : Greater Than. It means end of tag. +- & : Ampersand. It means beginning of XHTML Entity. + +> "&" usage in markup style changed from Tizen 4.0. +"To display special character needs as regular, prepend it with two backslashes in the string." + +Below are some examples + +~~~{.cpp} +// C++ ( Wrong usage to print text "Testing of < special character" ) +field.SetProperty( TextLabel::Property::TEXT, "Testing of < special character" ); +~~~ + +![ ](SpecialCharacter1.png) + +~~~{.cpp} +// C++ ( Wrong usage to print text "Testing of & special character" ) +field.SetProperty( TextLabel::Property::TEXT, "Testing of & special character" ); +~~~ + +![ ](SpecialCharacter1.png) + +~~~{.cpp} +// C++ ( Correct usage to print text "Testing of & < > special characters" ) +field.SetProperty( TextLabel::Property::TEXT, "Testing of \\& \\< \\> special characters" ); +~~~ + +![ ](SpecialCharacters.png) + */ -- 2.7.4