You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimized from this Zulip thread. It appears that std::getenv on windows returns data in the current code page, so putting it directly into a lean String is not legal (because it assumes UTF-8 encoding). Other languages have faced the same issue:
Both of these languages take the approach of using the widestring version of the function (which is reliably UTF-16 (with potentially unpaired surrogates)) and manually converting it to UTF-8 (or WTF-8). This is a bit sad, I thought the A version of the function was supposed to be UTF-8. (Maybe it is, I can't test it.)
The text was updated successfully, but these errors were encountered:
Unclear. (The issue description is a bit vague.) But I don't think so; from what I can tell #668 is about a build system issue, not runtime usage of getEnv and related functions.
Minimized from this Zulip thread. It appears that
std::getenv
on windows returns data in the current code page, so putting it directly into a leanString
is not legal (because it assumes UTF-8 encoding). Other languages have faced the same issue:getEnv
doesn't return UTF-8 on Windows nim-lang/Nim#20083Both of these languages take the approach of using the widestring version of the function (which is reliably UTF-16 (with potentially unpaired surrogates)) and manually converting it to UTF-8 (or WTF-8). This is a bit sad, I thought the
A
version of the function was supposed to be UTF-8. (Maybe it is, I can't test it.)The text was updated successfully, but these errors were encountered: