Skip to content

JSValue with std::wstring or hstring possible? #9399

Answered by asklar
creambyemute asked this question in Q&A
Discussion options

You must be logged in to vote

JSValue::AsString gives back the UTF-8 std::string, then winrt::to_hstring is supposed to convert that to a UCS-2 string; however in your PR you are creating the std::filesystem::path object from the UTF8 bytes instead of converting the UTF8 string to wstring then creating the path object with the wstring, can you try that?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@creambyemute
Comment options

Answer selected by chrisglein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants