diff --git a/tdutils/td/utils/port/wstring_convert.cpp b/tdutils/td/utils/port/wstring_convert.cpp index 45ad32065..c81d0695f 100644 --- a/tdutils/td/utils/port/wstring_convert.cpp +++ b/tdutils/td/utils/port/wstring_convert.cpp @@ -10,6 +10,8 @@ char disable_linker_warning_about_empty_file_wstring_convert_cpp TD_UNUSED; #if TD_PORT_WINDOWS +#include "td/utils/base64.h" +#include "td/utils/SliceBuilder.h" #include "td/utils/utf8.h" #include @@ -18,7 +20,7 @@ namespace td { Result to_wstring(CSlice slice) { if (!check_utf8(slice)) { - return Status::Error("Wrong string encoding"); + return Status::Error(PSLICE() << "String was expected to be encoded in UTF-8: " << base64_encode(slice)); } size_t wstring_len = utf8_utf16_length(slice);