#include "dsodefs.h"
#include "utility.h"
#include <string>
#include <boost/cstdint.hpp>
#include <limits>
Go to the source code of this file.
Namespaces | |
namespace | utf8 |
Utilities to convert between std::string and std::wstring. | |
Enumerations | |
enum | utf8::TextEncoding { utf8::encUNSPECIFIED, utf8::encUTF8, utf8::encUTF16BE, utf8::encUTF16LE, utf8::encUTF32BE, utf8::encUTF32LE, utf8::encSCSU, utf8::encUTF7, utf8::encUTFEBCDIC, utf8::encBOCU1 } |
Functions | |
DSOEXPORT std::wstring | utf8::decodeCanonicalString (const std::string &str, int version) |
Converts a std::string with multibyte characters into a std::wstring. | |
DSOEXPORT std::string | utf8::encodeCanonicalString (const std::wstring &wstr, int version) |
Converts a std::wstring into canonical std::string. | |
DSOEXPORT boost::uint32_t | utf8::decodeNextUnicodeCharacter (std::string::const_iterator &it, const std::string::const_iterator &e) |
Return the next Unicode character in the UTF-8 encoded string. | |
DSOEXPORT std::string | utf8::encodeUnicodeCharacter (boost::uint32_t ucs_character) |
Encodes the given wide character into a canonical string, theoretically up to 6 chars in length. | |
DSOEXPORT std::string | utf8::encodeLatin1Character (boost::uint32_t ucsCharacter) |
Encodes the given wide character into an at least 8-bit character. | |
DSOEXPORT char * | utf8::stripBOM (char *in, size_t &size, TextEncoding &encoding) |
Interpret (and skip) Byte Order Mark in input stream. | |
DSOEXPORT const char * | utf8::textEncodingName (TextEncoding enc) |
Return name of a text encoding. |