HikoGUI
A low latency retained GUI
|
Files | |
file | ascii.hpp |
Definition of the ASCII character map. | |
file | char_converter.hpp |
Definition of the char_converter<From,To> functor. | |
file | cp_1252.hpp |
Definition of the CP-1252 / Windows-1252 character map. | |
file | iso_8859_1.hpp |
Definition of the ISO-8859-1 / Latin-1 character map. | |
file | to_string.hpp |
String conversion functions. | |
file | utf_32.hpp |
Definition of the Unicode UTF-32 encoding. | |
file | utf_8.hpp |
Definition of the Unicode UTF-8 encoding. | |
Data Structures | |
struct | hi::v1::char_map<"ascii"> |
ASCII (7-bit) character map. More... | |
struct | hi::v1::char_map< Encoding > |
Character encoder/decoder template. More... | |
struct | hi::v1::char_converter< From, To > |
A converter between character encodings. More... | |
struct | hi::v1::char_map<"cp-1252"> |
CP-1252 / Windows-1252 character map. More... | |
struct | hi::v1::char_map<"iso-8859-1"> |
ISO-8859-1 / Latin-1 character map. More... | |
struct | hi::v1::char_map<"utf-16"> |
Unicode UTF-16 encoding. More... | |
struct | hi::v1::char_map<"utf-32"> |
Unicode UTF-32 encoding. More... | |
struct | hi::v1::char_map<"utf-8"> |
Unicode UTF-8 encoding. More... | |
Functions | |
constexpr std::u32string | hi::v1::to_u32string (std::u32string_view rhs) noexcept |
Identity conversion from UTF-32 to UTF-32. | |
constexpr std::u32string | hi::v1::to_u32string (std::u16string_view rhs) noexcept |
Conversion from UTF-16 to UTF-32. | |
constexpr std::u32string | hi::v1::to_u32string (std::u8string_view rhs) noexcept |
Conversion from UTF-8 to UTF-32. | |
constexpr std::u32string | hi::v1::to_u32string (std::wstring_view rhs) noexcept |
Conversion from wide-string (UTF-16/32) to UTF-32. | |
constexpr std::u32string | hi::v1::to_u32string (std::string_view rhs) noexcept |
Conversion from UTF-8 to UTF-32. | |
constexpr std::u16string | hi::v1::to_u16string (std::u32string_view rhs) noexcept |
Conversion from UTF-32 to UTF-16. | |
constexpr std::u16string | hi::v1::to_u16string (std::u16string_view rhs) noexcept |
Identity conversion from UTF-16 to UTF-16. | |
constexpr std::u16string | hi::v1::to_u16string (std::u8string_view rhs) noexcept |
Conversion from UTF-8 to UTF-16. | |
constexpr std::u16string | hi::v1::to_u16string (std::wstring_view rhs) noexcept |
Conversion from wide-string (UTF-16/32) to UTF-16. | |
constexpr std::u16string | hi::v1::to_u16string (std::string_view rhs) noexcept |
Conversion from UTF-8 to UTF-16. | |
constexpr std::u8string | hi::v1::to_u8string (std::u32string_view rhs) noexcept |
Conversion from UTF-32 to UTF-8. | |
constexpr std::u8string | hi::v1::to_u8string (std::u16string_view rhs) noexcept |
Conversion from UTF-16 to UTF-8. | |
constexpr std::u8string | hi::v1::to_u8string (std::u8string_view rhs) noexcept |
Identity conversion from UTF-8 to UTF-8. | |
constexpr std::u8string | hi::v1::to_u8string (std::wstring_view rhs) noexcept |
Conversion from wide-string (UTF-16/32) to UTF-8. | |
constexpr std::u8string | hi::v1::to_u8string (std::string_view rhs) noexcept |
Conversion from UTF-8 to UTF-8. | |
constexpr std::wstring | hi::v1::to_wstring (std::u32string_view rhs) noexcept |
Conversion from UTF-32 to wide-string (UTF-16/32). | |
constexpr std::wstring | hi::v1::to_wstring (std::u16string_view rhs) noexcept |
Conversion from UTF-16 to wide-string (UTF-16/32). | |
constexpr std::wstring | hi::v1::to_wstring (std::u8string_view rhs) noexcept |
Conversion from UTF-8 to wide-string (UTF-16/32). | |
constexpr std::wstring | hi::v1::to_wstring (std::wstring_view rhs) noexcept |
Identity conversion from wide-string (UTF-16/32) to wide-string (UTF-16/32). | |
constexpr std::wstring | hi::v1::to_wstring (std::string_view rhs) noexcept |
Conversion from UTF-8 to wide-string (UTF-16/32). | |
constexpr std::string | hi::v1::to_string (std::u32string_view rhs) noexcept |
Conversion from UTF-32 to UTF-8. | |
constexpr std::string | hi::v1::to_string (std::u16string_view rhs) noexcept |
Conversion from UTF-16 to UTF-8. | |
constexpr std::string | hi::v1::to_string (std::u8string_view rhs) noexcept |
Identity conversion from UTF-8 to UTF-8. | |
constexpr std::string | hi::v1::to_string (std::wstring_view rhs) noexcept |
Conversion from wide-string (UTF-16/32) to UTF-8. | |
constexpr std::string | hi::v1::to_string (std::string_view rhs) noexcept |
Conversion from UTF-8 to UTF-8. | |
These templates are uses to convert between different character encodings.
You can also convert between the same character encoding, this can be done to 'repair' invalid encodings. For example when converting from ASCII to ASCII any characters in the original string above 127 will be replaced with a question mark '?' after conversion. For UTF-8 to UTF-8 invalid encodings may be interpreted as CP-1252 and correctly converted to the unicode equivalent, or the replacement character U+fffd.
Here is an example to convert a string from ISO-8859-1 to UTF-8:
Currently supported are:
It is possible to add character encodings by specializing char_map<>
in your application.
|
constexprnoexcept |
Conversion from UTF-8 to UTF-8.
|
constexprnoexcept |
Conversion from UTF-16 to UTF-8.
|
constexprnoexcept |
Conversion from UTF-32 to UTF-8.
|
constexprnoexcept |
Identity conversion from UTF-8 to UTF-8.
|
constexprnoexcept |
Conversion from wide-string (UTF-16/32) to UTF-8.
|
constexprnoexcept |
Conversion from UTF-8 to UTF-16.
|
constexprnoexcept |
Identity conversion from UTF-16 to UTF-16.
|
constexprnoexcept |
Conversion from UTF-32 to UTF-16.
|
constexprnoexcept |
Conversion from UTF-8 to UTF-16.
|
constexprnoexcept |
Conversion from wide-string (UTF-16/32) to UTF-16.
|
constexprnoexcept |
Conversion from UTF-8 to UTF-32.
|
constexprnoexcept |
Conversion from UTF-16 to UTF-32.
|
constexprnoexcept |
Identity conversion from UTF-32 to UTF-32.
|
constexprnoexcept |
Conversion from UTF-8 to UTF-32.
|
constexprnoexcept |
Conversion from wide-string (UTF-16/32) to UTF-32.
|
constexprnoexcept |
Conversion from UTF-8 to UTF-8.
|
constexprnoexcept |
Conversion from UTF-16 to UTF-8.
|
constexprnoexcept |
Conversion from UTF-32 to UTF-8.
|
constexprnoexcept |
Identity conversion from UTF-8 to UTF-8.
|
constexprnoexcept |
Conversion from wide-string (UTF-16/32) to UTF-8.
|
constexprnoexcept |
Conversion from UTF-8 to wide-string (UTF-16/32).
|
constexprnoexcept |
Conversion from UTF-16 to wide-string (UTF-16/32).
|
constexprnoexcept |
Conversion from UTF-32 to wide-string (UTF-16/32).
|
constexprnoexcept |
Conversion from UTF-8 to wide-string (UTF-16/32).
|
constexprnoexcept |
Identity conversion from wide-string (UTF-16/32) to wide-string (UTF-16/32).