A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__utf8.html below:

NCBI C++ ToolKit: UTF-8 Conversion

const SUnicodeTranslationUnicodeToAscii (TUnicode character, const TUnicodeTable *table=NULL, const SUnicodeTranslation *default_translation=NULL)   Convert Unicode character into ASCII string. More...
  size_t  UTF8ToUnicode (const char *utf, TUnicode *unicode)   Convert UTF8 into Unicode character. More...
  size_t  UnicodeToUTF8 (TUnicode unicode, char *buffer, size_t buf_length)   Convert Unicode character into UTF8. More...
  string  UnicodeToUTF8 (TUnicode unicode)   Convert Unicode character into UTF8. More...
  ssize_t  UTF8ToAscii (const char *src, char *dst, size_t dst_len, const SUnicodeTranslation *default_translation, const TUnicodeTable *table=NULL, EConversionResult *result=NULL)   Convert UTF8 into ASCII character buffer. More...
  string  UTF8ToAsciiString (const char *src, const SUnicodeTranslation *default_translation, const TUnicodeTable *table=NULL, EConversionResult *result=NULL)   Convert UTF8 into ASCII string. More...
  char  StringToChar (const string &src, size_t *seq_len=0, bool ascii_table=true, EConversionStatus *status=0)   string  StringToAscii (const string &src, bool ascii_table=true)   long  StringToCode (const string &src, size_t *seq_len=0, EConversionStatus *status=0)   vector< long >  StringToVector (const string &src)   char  CodeToChar (const long src, EConversionStatus *status=0)   ◆ TUnicode ◆ TUnicodePlan ◆ TUnicodeTable ◆ EConversionResult Enumerator eConvertedFine  eDefaultTranslationUsed 

Definition at line 62 of file unicode.hpp.

◆ EConversionStatus Enumerator eSuccess  eSkipChar  eOutrangeChar 

Definition at line 64 of file utf8.hpp.

◆ ESubstType

Types of substitutors.

Enumerator eSkip 

Unicode to be skipped in translation. Usually it is combined mark.

eAsIs 

Unicodes which should go into the text as is.

eString 

String of symbols.

eException 

Throw exception (CUtilException, with type eWrongData)

eHTML 

HTML tag or, for example, HTML entity.

ePicture 

Path to the picture, or maybe picture itself.

eOther 

Something else.

Definition at line 50 of file unicode.hpp.

◆ CodeToChar() ◆ StringToAscii() ◆ StringToChar() ◆ StringToCode() ◆ StringToVector() ◆ UnicodeToAscii()

Convert Unicode character into ASCII string.

Parameters
character character to translate table Table to use in translation. If Table is not specified, the internal default one will be used.
Returns
Pointer to substitute structure

Definition at line 324 of file unicode.cpp.

References eException, g_DefaultUnicodeTable, g_UnicodeTranslation, NCBI_THROW, NULL, t, table, and SUnicodeTranslation::Type.

Referenced by CWordPairIndexer::ConvertUTF8ToAscii(), CUnicodeToAsciiTranslation::CUnicodeToAsciiTranslation(), UTF8ToAscii(), and UTF8ToAsciiString().

◆ UnicodeToUTF8() [1/2]

Convert Unicode character into UTF8.

Parameters
unicode Unicode character
Returns
UTF8 buffer as a string

Definition at line 416 of file unicode.cpp.

References string.

◆ UnicodeToUTF8() [2/2] size_t UnicodeToUTF8 ( TUnicode  unicode, char *  buffer, size_t  buf_length  )

Convert Unicode character into UTF8.

Parameters
unicode Unicode character buffer UTF8 buffer to store the result buf_length UTF8 buffer size
Returns
Length of the generated UTF8 sequence

Definition at line 424 of file unicode.cpp.

◆ UTF8ToAscii()

Convert UTF8 into ASCII character buffer.

Decode UTF8 buffer and substitute all Unicodes with appropriate symbols or words from dictionary.

Parameters
src UTF8 buffer to decode dst Buffer to put the result in dst_len Length of the destignation buffer default_translation Default translation of unknown Unicode symbols table Table to use in translation. If Table is not specified, the internal default one will be used. result Result of the conversion
Returns
Length of decoded string or -1 if buffer is too small

Definition at line 458 of file unicode.cpp.

References eAsIs, eConvertedFine, eDefaultTranslationUsed, eSkip, result, SUnicodeTranslation::Subst, table, SUnicodeTranslation::Type, UnicodeToAscii(), and UTF8ToUnicode().

◆ UTF8ToAsciiString()

Convert UTF8 into ASCII string.

Decode UTF8 buffer and substitute all Unicodes with appropriate symbols or words from dictionary.

Parameters
src UTF8 buffer to decode default_translation Default translation of unknown Unicode symbols table Table to use in translation. If Table is not specified, the internal default one will be used. result Result of the conversion
Returns
String with decoded text

Definition at line 526 of file unicode.cpp.

References eAsIs, eConvertedFine, eDefaultTranslationUsed, eSkip, kEmptyStr, result, string, SUnicodeTranslation::Subst, table, SUnicodeTranslation::Type, UnicodeToAscii(), and UTF8ToUnicode().

Referenced by ToAsciiStdString(), and utf8_to_string().

◆ UTF8ToUnicode()

Convert UTF8 into Unicode character.

Parameters
utf Start of UTF8 character buffer unicode Pointer to Unicode character to store the result in
Returns
Length of the translated UTF8 or 0 in case of error.

Definition at line 382 of file unicode.cpp.

Referenced by CWordPairIndexer::ConvertUTF8ToAscii().

◆ kOutrangeChar const char kOutrangeChar = '?' ◆ kSkipChar const char kSkipChar = '\xFF' ◆ Subst const char* SUnicodeTranslation::Subst ◆ Type

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4