Rename some unicode functions and document better
This commit is contained in:
@@ -221,7 +221,7 @@ static int socket_poll(struct pollfd *pollvec, int pollcount, int mstimeout, std
|
||||
|
||||
// Write unicode onto the console.
|
||||
static void console_write(const std::u32string &cps) {
|
||||
std::string utf8 = drvutil::to_utf8(cps);
|
||||
std::string utf8 = drvutil::utf32_to_utf8(cps);
|
||||
write(1, utf8.c_str(), utf8.size());
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ static std::u32string console_read() {
|
||||
int nread = read(0, buffer, 512);
|
||||
if (nread > 0) {
|
||||
std::string_view s(buffer, nread);
|
||||
result = drvutil::from_utf8(s, nullptr);
|
||||
result = drvutil::utf8_to_utf32(s, nullptr);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user