bux API Reference 1.11.0
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Loading...
Searching...
No Matches
UnicodeCvt.h File Reference
#include "XQue.h"
#include <cstdint>
#include <functional>
#include <iosfwd>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include <iconv.h>
Include dependency graph for UnicodeCvt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bux::C_UnicodeIn
 

Namespaces

namespace  bux
 THE common namespace of bux library.
 

Typedefs

typedef std::uint32_t bux::T_Utf32
 UTF-32 to cover the full range of codespace U+0000 ~ U+10FFFF.
 
typedef std::uint16_t bux::T_Utf16
 UTF-16: You need T_Utf16[2] to hold full range of unicode.
 
typedef std::uint8_t bux::T_Utf8
 UTF-8: You need T_Utf8[4] to hold full range of unicode.
 
typedef std::function< std::optional< char >()> bux::FH_ReadChar
 
typedef const char *const * bux::T_Encoding
 
typedef std::uint32_t T_Utf32
 UTF-32 to cover the full range of codespace U+0000 ~ U+10FFFF.
 
typedef std::uint16_t T_Utf16
 UTF-16: You need T_Utf16[2] to hold full range of unicode.
 
typedef std::uint8_t T_Utf8
 UTF-8: You need T_Utf8[4] to hold full range of unicode.
 

Enumerations

enum  {
  bux::MAX_UTF16 = 2 , bux::MAX_UTF8 = 6 , bux::MAX_UTF8_BMP = 3 , bux::MAX_UTF8_VALID = 4 ,
  bux::UIE_EOF = 0 , bux::UIE_ILLFORMED_UNICODE = -1 , bux::UIE_INCOMPLETE_UNICODE = -2 , bux::UIE_NO_UNICODE_TRANSLATION = -3 ,
  bux::UIE_INTERNAL = -9
}
 

Functions

std::string_view bux::to_utf8 (T_Utf32 uc)
 
std::string bux::to_utf8 (C_UnicodeIn &&uin)
 
template<typename T>
std::string bux::to_utf8 (const T *ps, size_t size=0, T_Encoding codepage=0)
 
template<typename T>
std::string bux::to_utf8 (const std::basic_string< T > &s, T_Encoding codepage=0)
 
template<typename T>
std::string bux::to_utf8 (std::basic_string_view< T > s, T_Encoding codepage=0)
 
template<typename T>
std::basic_string< T > bux::BOM (std::basic_string_view< T > sv)
 
template<typename T>
std::basic_string< T > bux::BOM (const T *p)
 

Typedef Documentation

◆ T_Utf16

typedef std::uint16_t bux::T_Utf16

UTF-16: You need T_Utf16[2] to hold full range of unicode.

Definition at line 40 of file UnicodeCvt.h.

◆ T_Utf32

typedef std::uint32_t bux::T_Utf32

UTF-32 to cover the full range of codespace U+0000 ~ U+10FFFF.

Definition at line 39 of file UnicodeCvt.h.

◆ T_Utf8

typedef std::uint8_t bux::T_Utf8

UTF-8: You need T_Utf8[4] to hold full range of unicode.

Definition at line 41 of file UnicodeCvt.h.