-
I want to write the log file in form of utf-8 encoding. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Short answer: spdlog does not support Long answer: In the C/C++ language, there is no character encoding specification for However, most Linux OS treat NOTE: actual applications read external files and exchange data via HTTP request/response. |
Beta Was this translation helpful? Give feedback.
-
As of c++23, there will be native UTF-8 support in c++. Are there any plans to support c++23's char8_t ? |
Beta Was this translation helpful? Give feedback.
Short answer: spdlog does not support
char *
character encoding conversion.Long answer: In the C/C++ language, there is no character encoding specification for
char *
. The lack of specification means that it is compiler and platform (OS) dependent.Since there is no language specification, there is no way to know spdlog the character encoding of the data assigned to
char *
.However, most Linux OS treat
char *
in source code as UTF-8 encoding.More strictly, the GCC compiler uses the
exec-charset
option to determine the character encoding ofchar *
in the source code (https://gcc.gnu.org/onlinedocs/cpp/Invocation.html).It is safe to assume that the character encoding used by the compiler…