New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Windows locale problem #13107
Fix Windows locale problem #13107
Conversation
src/util.cpp
Outdated
@@ -1018,3 +1018,49 @@ int ScheduleBatchPriority(void) | |||
return 1; | |||
#endif | |||
} | |||
|
|||
std::string Utf8ToLocal(const std::string& utf8_string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe move to utilstrencodings
?
Thanks. Though I'm sad that this is needed.
BTW, there are |
prefer #13426 |
Fixes #13103
This PR make internal strings of Windows always be utf8-encoded
Patched the boost library to convert
fs::path::string()
to be UTF8 encoded. Add two functions that convert between UTF8 and Local encodes.To those who want to test this, adding
-datadir=(some non-ASCII characters)
option make every file that Bitcoin Core use contain non-ASCII charactersDefect: If the user's codepage does not support the filename, it will be encoded to
?
I don't known how to solve this. Leveldb and Berkeley DB don't support wide char.