Open reupen opened 2 years ago
Alternately - .whatW()
that returns an Unicode string? Might be a viable approach too.
Yes, that would be useful as well. For me personally, UTF-8 would be simpler as I'm already generally dealing with it and so could avoid special handling for wil::ResultException
.
Not all UTF8 strings can be represented in UCS2, though?
5 maj 2022 kl. 23:22 skrev Reupen Shah @.***>:
Yes, that would be useful as well. For me personally, UTF-8 would be simpler as I'm already generally dealing with it and so could avoid special handling for wil::ResultException.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
Not all UTF8 strings can be represented in UCS2, though? … 5 maj 2022 kl. 23:22 skrev Reupen Shah @.***>: Yes, that would be useful as well. For me personally, UTF-8 would be simpler as I'm already generally dealing with it and so could avoid special handling for wil::ResultException. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
Windows uses UTF-16, not UCS-2.
Right. I might have thought about the fact that fileNAMES in Windows can contain data which is not valid UTF16.
IIRC all standard c++ exceptions' what()
uses encoding of "current locale's code page", which normally happens to be ANSI code page.
For example, std::system_error
with std::system_category
on MSVC, or std::filesystem::filesystem_error
.
Hi,
Am I right in thinking that
wil::ResultException::what()
returns an ANSI-encoded string?It'd be useful to be able to configure the library to return a UTF-8 string instead.
Thanks