Fix json invalid utf-8 from IconPath by CarlosNihelton · Pull Request #13340 · microsoft/WSL
When storing the IconPath value directly as a string we are subject to unspecified behaviour as Windows stores paths as 16-bit wchar_t and std::string doesn't convey a specific char encoding. To be specific we need to access the icon path in its native format (which we assume to be std::wstring) and convert it to multibyte.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters