Skip to content

Commit

Permalink
fix(core): fix console module log encode
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao authored and zealotchen0 committed Oct 27, 2023
1 parent d39881c commit bf266b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/modules/console_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ GEN_INVOKE_CB(ConsoleModule, Log) // NOLINT(cert-err58-cpp)
namespace {

unicode_string_view EscapeMessage(const unicode_string_view& str_view) {
std::string u8_str = StringViewUtils::ToU8StdStr(str_view);
unicode_string_view::u8string u8_str = StringViewUtils::Convert(str_view, unicode_string_view::Encoding::Utf8).utf8_value();
size_t len = u8_str.length();
std::string ret;
unicode_string_view::u8string ret;
for (size_t i = 0; i < len; i++) {
auto c = u8_str[i];
ret += c;
Expand Down

0 comments on commit bf266b9

Please sign in to comment.