diff options
author | Mikhail Redko <ovitnez@gmail.com> | 2021-04-11 20:41:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 19:41:44 +0200 |
commit | 1539bed3db86f2153f2d0d5fbf24bf9ee4af1d92 (patch) | |
tree | ed25236f21145d23d6e3a3fc9d7ff62675a13ba9 /src/common/Utilities/Util.h | |
parent | 6bdfa91fa795b24bfba6a4497784b693f6216638 (diff) |
Core/Misc: Fixed utf8 encoding in console input/output. (#26352)
* Core/Misc: Fixed utf8 encoding in console input/output.
* Fix gcc build
* Fixed that weird 'a' with circle above it and other similar letters. Also fixed encoding in AppenderConsole which sometimes did not work as it should
* Fix build on Linux
* Probably better to do it like this
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index cf4c6cff23f..5b90f0cf86e 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -292,6 +292,11 @@ TC_COMMON_API void utf8printf(FILE* out, const char *str, ...); TC_COMMON_API void vutf8printf(FILE* out, const char *str, va_list* ap); TC_COMMON_API bool Utf8ToUpperOnlyLatin(std::string& utf8String); +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS +TC_COMMON_API bool ReadWinConsole(std::string& str, size_t size = 256); +TC_COMMON_API bool WriteWinConsole(std::string_view str, bool error = false); +#endif + TC_COMMON_API bool IsIPAddress(char const* ipaddress); TC_COMMON_API uint32 CreatePIDFile(std::string const& filename); |