Gnash  0.8.10
Namespaces | Enumerations | Functions
utf8.h File Reference
#include <string>
#include <boost/cstdint.hpp>
#include <vector>
#include "dsodefs.h"

Go to the source code of this file.

Namespaces

namespace  gnash
 

Anonymous namespace for callbacks, local functions, event handlers etc.


namespace  gnash::utf8
 

Utilities to convert between std::string and std::wstring.


Enumerations

enum  gnash::utf8::TextEncoding {
  gnash::utf8::encUNSPECIFIED, gnash::utf8::encUTF8, gnash::utf8::encUTF16BE, gnash::utf8::encUTF16LE,
  gnash::utf8::encUTF32BE, gnash::utf8::encUTF32LE, gnash::utf8::encSCSU, gnash::utf8::encUTF7,
  gnash::utf8::encUTFEBCDIC, gnash::utf8::encBOCU1
}
enum  gnash::utf8::EncodingGuess { gnash::utf8::ENCGUESS_UNICODE = 0, gnash::utf8::ENCGUESS_JIS = 1, gnash::utf8::ENCGUESS_OTHER = 2 }

Functions

std::wstring gnash::utf8::decodeCanonicalString (const std::string &str, int version)
 Converts a std::string with multibyte characters into a std::wstring.
std::string gnash::utf8::encodeCanonicalString (const std::wstring &wstr, int version)
 Converts a std::wstring into canonical std::string.
boost::uint32_t gnash::utf8::decodeNextUnicodeCharacter (std::string::const_iterator &it, const std::string::const_iterator &e)
 Return the next Unicode character in the UTF-8 encoded string.
std::string gnash::utf8::encodeUnicodeCharacter (boost::uint32_t ucs_character)
 Encodes the given wide character into a canonical string, theoretically up to 6 chars in length.
std::string gnash::utf8::encodeLatin1Character (boost::uint32_t ucsCharacter)
 Encodes the given wide character into an at least 8-bit character.
char * gnash::utf8::stripBOM (char *in, size_t &size, TextEncoding &encoding)
 Interpret (and skip) Byte Order Mark in input stream.
const char * gnash::utf8::textEncodingName (TextEncoding enc)
 Return name of a text encoding.
EncodingGuess gnash::utf8::guessEncoding (const std::string &s, int &length, std::vector< int > &offsets)
 Common code for guessing at the encoding of random text, between.