Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix console module log encode #3536

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading