-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Explicitly set encoding to utf8 when opening text files #8840
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
Merged
Conversation
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
These are text files but their encoding does not depend on the locale. Not all of them require utf8 but it is better to fix it at something to remove potential unpredictability. This is necessary on FreeBSD where no locale is set by default, and apparently Python defaults not only the terminal encoding to the locale but that of every text file. So without LOCALE environment it defaults text file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`. Luckily the locale doesn't affect the default encoding for str.encode() and bytes.decode() on Python 3, so this is the only change necessary.
Member
|
utACK 30930e8 |
laanwj
added a commit
that referenced
this pull request
Sep 30, 2016
…files 30930e8 test: Explicitly set encoding to utf8 when opening text files (Wladimir J. van der Laan)
maflcko
pushed a commit
to maflcko/bitcoin-core
that referenced
this pull request
Oct 3, 2016
These are text files but their encoding does not depend on the locale. Not all of them require utf8 but it is better to fix it at something to remove potential unpredictability. This is necessary on FreeBSD where no locale is set by default, and apparently Python defaults not only the terminal encoding to the locale but that of every text file. So without LOCALE environment it defaults text file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`. Luckily the locale doesn't affect the default encoding for str.encode() and bytes.decode() on Python 3, so this is the only change necessary. Github-Pull: bitcoin#8840 Rebased-From: 30930e8
codablock
pushed a commit
to codablock/dash
that referenced
this pull request
Jan 12, 2018
…g text files 30930e8 test: Explicitly set encoding to utf8 when opening text files (Wladimir J. van der Laan)
codablock
added a commit
to codablock/dash
that referenced
this pull request
Feb 1, 2018
bitcoin#8840: test: Explicitly set encoding to utf8 when opening text files
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Jan 6, 2019
…g text files 30930e8 test: Explicitly set encoding to utf8 when opening text files (Wladimir J. van der Laan)
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Jan 6, 2019
bitcoin#8840: test: Explicitly set encoding to utf8 when opening text files
CryptoCentric
pushed a commit
to absolute-community/absolute
that referenced
this pull request
Feb 28, 2019
bitcoin#8840: test: Explicitly set encoding to utf8 when opening text files
Merged
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Nov 10, 2020
Lint fixes Fixes most lints currently reported by `test/lint/lint-all.sh`. Includes changes cherry-picked from the following upstream PRs: - bitcoin/bitcoin#8700 - bitcoin/bitcoin#8840 - bitcoin/bitcoin#9867 - We backported the second commit in #3146 - bitcoin/bitcoin#10771 - bitcoin/bitcoin#11394 - bitcoin/bitcoin#11649 - bitcoin/bitcoin#17329 - bitcoin/bitcoin#19258
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are text files but their encoding does not depend on the locale. Not all of them require utf8 but it is better to fix it at something to remove potential unpredictability.
This is necessary on FreeBSD where no locale is set by default, and apparently Python defaults not only the terminal encoding to the locale but that of every text file. So without LOCALE environment it defaults text file encoding to ASCII. This causes problems with e.g.
bitcoin.conf.Luckily the locale doesn't affect the default encoding for str.encode() and bytes.decode() on Python 3, so this is the only change necessary.