Skip to content

Commit

Permalink
[UPD] Add info about utf8 mode for Windows:
Browse files Browse the repository at this point in the history
  • Loading branch information
mccwdev committed Nov 2, 2023
1 parent 6afd43e commit c22f96f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bitcoinlib/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@
}

if os.name == 'nt' and locale.getpreferredencoding().lower() != 'utf-8':
# import _locale
# _locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
import _locale
_locale._gdl_bak = _locale._getdefaultlocale
_locale._getdefaultlocale = (lambda *args: (_locale._gdl_bak()[0], 'utf8'))
Expand Down
4 changes: 4 additions & 0 deletions docs/_static/manuals.install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ for steps you could take to install this library.
If you have problems with installing this library on Windows you could try to use the pycryptodome library instead of
scrypt. The pycryptodome library is pure Python so it doesn't need any C compilers installed. But this will run slower.

When using Python on Windows it needs to be set to UTF-8 mode. You can do this by adding the PYTHONUTF8=1 to the
environment variables or use the -X utf8 command line option. Please see
https://docs.python.org/3/using/windows.html#win-utf8-mode for more information.


Update Bitcoinlib
-----------------
Expand Down

0 comments on commit c22f96f

Please sign in to comment.