ken2812221
commented at 4:08 am on April 28, 2018:
contributor
Fixes #13103
This PR make internal strings of Windows always be utf8-encoded
Add UTF8 <-> localized string conversion function
Use localized string on Berkeley DB
Use localized string on LevelDB
Use localized string on fstream::open
Use std::fstream instead of fs::fstream
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 characters
Defect: 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.
laanwj
commented at 5:25 am on April 28, 2018:
member
Thanks. Though I’m sad that this is needed.
To stay sane, and keep locales and encodings out of everything as much as possible:
Please keep all our internal state in UTF-8 everywhere. This was always the intent, so in interaction with JSONRPC we can assume all strings are UTF-8, and matches with Qt’s view.
Only convert to local encoding when needed, so just before going to the file system layer, or when coming from the file system layer (or filenames, command-line arguments etc).
BTW, there are GUIUtil::qstringToBoostPath and GUIUtil::qstringToBoostPath to convert Qt strings from/to local paths but I don’t think they are useful in this case as it doesn’t happen on the interface from Qt to core code.
ken2812221 renamed this:
Fix Windows locale problem
[WIP] Fix Windows locale problem
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 force-pushed
on Apr 28, 2018
ken2812221 renamed this:
[WIP] Fix Windows locale problem
Fix Windows locale problem
on Apr 28, 2018
ken2812221 force-pushed
on Apr 29, 2018
ken2812221 force-pushed
on Apr 29, 2018
ken2812221 force-pushed
on Apr 29, 2018
ken2812221 force-pushed
on Apr 29, 2018
ken2812221 force-pushed
on Apr 29, 2018
ken2812221 force-pushed
on Apr 29, 2018
MarcoFalke added the label
Windows
on Apr 30, 2018
MarcoFalke removed the label
Wallet
on Apr 30, 2018
MarcoFalke added the label
Utils/log/libs
on Apr 30, 2018
MarcoFalke removed the label
Windows
on Apr 30, 2018
MarcoFalke added the label
Wallet
on Apr 30, 2018
MarcoFalke added the label
Windows
on Apr 30, 2018
MarcoFalke added the label
UTXO Db and Indexes
on Apr 30, 2018
ken2812221 force-pushed
on May 1, 2018
ken2812221 force-pushed
on May 2, 2018
ken2812221 force-pushed
on May 3, 2018
ken2812221 force-pushed
on May 3, 2018
ken2812221 force-pushed
on May 3, 2018
ken2812221 force-pushed
on May 3, 2018
ken2812221 closed this
on May 9, 2018
MarcoFalke deleted a comment
on May 9, 2018
ken2812221 reopened this
on May 9, 2018
ken2812221 force-pushed
on May 10, 2018
ken2812221 force-pushed
on May 10, 2018
ken2812221 force-pushed
on May 10, 2018
Use utf8 encoded string on Windows53552475d1
Change to local encoding filename on Berkeley DB7f9dfdc544
Change to local encoding filename on Level DB13a57b27c6
Add ifstream/ofstream to fsbridgeb85f1b55dc
Move fs/std::i/ofstream to fsbridge::i/ofstreama7e55100f3
Use utf8 at StartupShortcutPath3342746618
Parse command line argv utf8c1f5cd3906
ken2812221 force-pushed
on May 24, 2018
ken2812221
commented at 4:26 pm on June 11, 2018:
contributor
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me