Skip to content
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

utils: Convert fs::filesystem_error messages from local multibyte to utf-8 on Windows #14192

Merged
merged 1 commit into from Sep 13, 2018

Conversation

@ken2812221
Copy link
Contributor

@ken2812221 ken2812221 commented Sep 10, 2018

Before:
default
After:
2

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Sep 10, 2018

Note to reviewers: This pull request conflicts with the following ones:
  • #13878 (utils: Add fstream wrapper to allow to pass unicode filename on Windows by ken2812221)
  • #13787 (Test for Windows encoding issue by ken2812221)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

@laanwj laanwj commented Sep 11, 2018

utACK e221368

@laanwj laanwj merged commit e221368 into bitcoin:master Sep 13, 2018
2 checks passed
laanwj added a commit that referenced this issue Sep 13, 2018
… multibyte to utf-8 on Windows

e221368 utils: Convert fs error messages from multibyte to utf-8 (Chun Kuan Lee)

Pull request description:

  Before:
  ![default](https://user-images.githubusercontent.com/11154118/45318798-8d83f480-b570-11e8-8cbb-c729a54f6b9e.png)
  After:
  ![2](https://user-images.githubusercontent.com/11154118/45318806-91177b80-b570-11e8-9474-a62342c92dbd.png)

Tree-SHA512: 0a598bd159286f6784d117b8a24888b2650d5402d687ab0e8d0849e0c3d53797e266647d8177bb6614307c9598019cd7477311bb9895b1bb52a6bd77b460fda1
@ken2812221 ken2812221 deleted the boost-fs-error-unicode branch Sep 13, 2018
@sipsorcery
Copy link
Member

@sipsorcery sipsorcery commented Sep 13, 2018

tACK e221368.

14192_dialog

Note that the directory shown in the dialog does exist but that's a separate problem that is dealt with by #13787.

Warrows added a commit to Warrows/PIVX that referenced this issue Oct 14, 2019
Warrows added a commit to Warrows/PIVX that referenced this issue Nov 23, 2019
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Mar 24, 2020
Summary: Backport of core [[bitcoin/bitcoin#14192 | PR14192]].

Test Plan:
  ninja check check-functional
Run the Windows Gitian build.

On Windows:
  ./bitcoin-qt.exe -regtest -wallet=???
Before:
{F4227187}
After:
{F4227188}

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5538
ftrader added a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue May 19, 2020
Summary: Backport of core [[bitcoin/bitcoin#14192 | PR14192]].

Test Plan:
  ninja check check-functional
Run the Windows Gitian build.

On Windows:
  ./bitcoin-qt.exe -regtest -wallet=???
Before:
{F4227187}
After:
{F4227188}

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5538
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Jun 15, 2021
PastaPastaPasta added a commit to dashpay/dash that referenced this issue Jun 25, 2021
random-zebra added a commit to PIVX-Project/PIVX that referenced this issue Aug 5, 2021
63e0be6 [Remove] By-pass logprint-scanner restriction. (furszy)
280ced3 utils: Fix broken Windows filelock (Chun Kuan Lee)
be89860 utils: Convert Windows args to utf-8 string (Chun Kuan Lee)
e8cfa6e Call unicode API on Windows (Chun Kuan Lee)
1a02a8a tests: Add test case for std::ios_base::ate (Chun Kuan Lee)
2e57cd4 Move boost/std fstream to fsbridge (furszy)
9d8bcd4 utils: Add fsbridge fstream function wrapper (Chun Kuan Lee)
d59d48d utils: Convert fs error messages from multibyte to utf-8 (ken2812221)
9ef58cc Logging: use "fmterr" variable name for errors instead of general "e" that can be used by any other function. (furszy)
dd94241 utils: Use _wfopen and _wreopen on Windows (Chun Kuan Lee)
3993641 add unicode compatible file_lock for Windows (Chun Kuan Lee)
48349f8 Provide relevant error message if datadir is not writable. (murrayn)

Pull request description:

  As the software is currently using the ANSI encoding on Windows, the user's language settings could affect the proper functioning of the node/wallet, to the point of not be able to open some non-ASCII name files and directories.

  This solves the Windows encoding issues, completing the entire bitcoin#13869 work path (and some other required backports). Enabling for example users that use non-english characters in directories and file names to be accepted.

  Backported PRs:
  * bitcoin#12422.
  * bitcoin#12630.
  * bitcoin#13862.
  * bitcoin#13866.
  * bitcoin#13877.
  * bitcoin#13878.
  * bitcoin#13883.
  * bitcoin#13884.
  * bitcoin#13886.
  * bitcoin#13888.
  * bitcoin#14192.
  * bitcoin#13734.
  * bitcoin#14426.

  This is built on top of other two PRs that i have open #2423 and #2369.
  Solves old issues #940 and #2163.

  TODO:
  * Backport `assert_start_raises_init_error` and `ErrorMatch` in TestNode` (bitcoin#12718)

ACKs for top commit:
  Fuzzbawls:
    ACK 63e0be6
  random-zebra:
    ACK 63e0be6 and merging...

Tree-SHA512: cb1f7c23abb5b7b3af50bba18652cc2cad93fd7c2fca9c16ffd3fee34c4c152a3b666dfa87fe6b44c430064dcdee4367144dcb4a41203c91b0173b805bdb3d7d
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants