bux API Reference 1.9.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 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
 
class  bux::C_MBCStr
 

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
 

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 (std::string_view s, T_Encoding codepage)
 
std::string bux::to_utf8 (std::istream &in, T_Encoding codepage)
 
template<typename T >
auto bux::to_utf8 (const T *ps, size_t size=0, T_Encoding codepage=0)
 
template<typename T >
auto bux::to_utf8 (std::basic_string_view< T > s, T_Encoding codepage=0)
 
std::wstring bux::BOM (const std::wstring_view &ws)