Skip to content

Commit 9f4b5ac

Browse files
author
Saurabh Kumar
committed
Update the encoding to be platform dependent as before
1 parent 97e16df commit 9f4b5ac

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD")
103103
`load_dotenv` do not override existing System environment variables. To
104104
override, pass `override=True` to `load_dotenv()`.
105105

106-
`load_dotenv` accepts `encoding` as parameter to open the `.env` using that particular encoding. Defaults to 'utf-8'. See [List of Python standard encodings](https://docs.python.org/3/library/codecs.html#standard-encodings)
106+
`load_dotenv` also accepts `encoding` parameter to open the `.env` file. The default encoding is platform dependent (whatever `locale.getpreferredencoding()` returns), but any encoding supported by Python can be used. See the [codecs](https://docs.python.org/3/library/codecs.html#standard-encodings) module for the list of supported encodings.
107107

108108
You can use `find_dotenv()` method that will try to find a `.env` file
109109
by (a) guessing where to start using `__file__` or the working directory
@@ -300,7 +300,7 @@ Unreleased
300300
-----
301301

302302
- Add type hints and expose them to users ([@qnighy])([#172])
303-
- `load_dotenv` and `dotenv_values` now accepts `encoding` paramater (#161)
303+
- `load_dotenv` and `dotenv_values` now accepts `encoding` paramater, defaults to `None` ([@theskumar])([@earlbread]) (#161)
304304

305305
0.10.1
306306
-----
@@ -427,3 +427,4 @@ Unreleased
427427
[@cjauvin]: https://github.com/cjauvin
428428
[@bbc2]: https://github.com/bbc2
429429
[@qnighy]: https://github.com/qnighy
430+
[@earlbread]: https://github.com/earlbread

0 commit comments

Comments
 (0)