Lots of work on unicode support
This commit is contained in:
@@ -46,6 +46,23 @@ std::string package_lua_source(const std::filesystem::path &base, std::ostream *
|
||||
//
|
||||
void split_target(std::string_view target, std::string &cert, std::string &host, std::string &port);
|
||||
|
||||
// Return true if the unicode codepoint can be converted to a single 16-bit wchar_t.
|
||||
//
|
||||
bool is_single_wchar_t(char32_t c);
|
||||
|
||||
// Convert a codepoint string into a UTF8-string.
|
||||
// If the codepoint string contains invalid codepoints, they're silently dropped.
|
||||
//
|
||||
std::string to_utf8(const std::u32string &cps);
|
||||
|
||||
// Convert a UTF8 string to a codepoint string.
|
||||
//
|
||||
// If the UTF8 string contains invalid sequences, they're silently dropped.
|
||||
// Some of the bytes may not be consumed, if the source ends with an unfinished
|
||||
// utf-8 sequence. Returns the Codepoint string and the number of bytes consumed.
|
||||
//
|
||||
std::u32string from_utf8(std::string_view source, int *consumed);
|
||||
|
||||
// Get a system error message, in an OS-independent manner.
|
||||
//
|
||||
// These versions of strerror is thread-safe, and it never fails
|
||||
|
||||
Reference in New Issue
Block a user