|
OpenTTD Source 15.0-beta2
|
Handling of UTF-8 encoded data. More...
Go to the source code of this file.
Functions | |
| std::pair< char[4], size_t > | EncodeUtf8 (char32_t c) |
| Encode a character to UTF-8. | |
| std::pair< size_t, char32_t > | DecodeUtf8 (std::string_view buf) |
| Decode a character from UTF-8. | |
Handling of UTF-8 encoded data.
Definition in file utf8.cpp.
| std::pair< size_t, char32_t > DecodeUtf8 | ( | std::string_view | buf | ) |
Decode a character from UTF-8.
| buf | Binary data. |
Definition at line 48 of file utf8.cpp.
References GB(), and HasBit().
Referenced by GlobalVarChangeInfo(), and VideoDriver_SDL_Base::PollEvent().
| std::pair< char[4], size_t > EncodeUtf8 | ( | char32_t | c | ) |
Encode a character to UTF-8.
| c | Character |
Definition at line 21 of file utf8.cpp.
References GB().
Referenced by Textbuf::InsertChar(), and BaseStringBuilder::PutUtf8().