Skip to content

Commit

Permalink
Add forgotten explicit encoding.
Browse files Browse the repository at this point in the history
This patch fixes #291.

Indeed, before this patch there may have been some encoding
collision because I forgot to put the encoding explicitely before
opening a CSV file.

Contributors:
  * @avatartw
  • Loading branch information
funilrys committed Feb 13, 2022
1 parent ccbf6fe commit 22d39cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PyFunceble/dataset/csv_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_csv_writer(self) -> Tuple[csv.DictWriter, open]:

add_header = not file_helper.exists()

file_handler = file_helper.open("a+", newline="")
file_handler = file_helper.open("a+", newline="", encoding="utf-8")
writer = csv.DictWriter(file_handler, fieldnames=self.FIELDS)

if add_header:
Expand Down
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ contribution(s) and or issue report which made or make `PyFunceble`_ a better to
__/ |
|___/

- avatartw - `@avatartw`_
- Avinash Reddy - `@AvinashReddy3108`_
- Daniel - `@dnmTX`_
- Haris Gušić - `@veracioux`_
- gwarser - `@gwarser`_
- Haris Gušić - `@veracioux`_
- hawkeye116477 - `@hawkeye116477`_
- Human Being - `@T145`_
- Imre Kristoffer Eilertsen - `@DandelionSprout`_
Expand Down Expand Up @@ -263,11 +264,12 @@ License
.. _shtab: https://github.com/iterative/shtab
.. _Terminalizer: https://github.com/faressoft/terminalizer
.. _yEd Graph Editor: https://www.yworks.com/products/yed
.. _yWorks: https://www.yworks.com/company
.. _yWorks: https://www.yworks.com

.. _@adblockplus: https://github.com/adblockplus
.. _@AnonymousPoster: https://www.mypdns.org/p/AnonymousPoster/
.. _@asciinema: https://github.com/asciinema
.. _@avatartw: https://github.com/avatartw
.. _@AvinashReddy3108: https://github.com/AvinashReddy3108
.. _@cdgriffith: https://github.com/cdgriffith
.. _@DandelionSprout: https://github.com/DandelionSprout
Expand Down
2 changes: 2 additions & 0 deletions docs/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ contribution(s) and or issue report which made or make `PyFunceble`_ a better to
__/ |
|___/

- avatartw - `@avatartw`_
- Avinash Reddy - `@AvinashReddy3108`_
- Daniel - `@dnmTX`_
- gwarser - `@gwarser`_
Expand Down Expand Up @@ -43,6 +44,7 @@ contribution(s) and or issue report which made or make `PyFunceble`_ a better to
- ZeroDot1 - `@ZeroDot1`_

.. _@AnonymousPoster: https://www.mypdns.org/p/AnonymousPoster/
.. _@avatartw: https://github.com/avatartw
.. _@AvinashReddy3108: https://github.com/AvinashReddy3108
.. _@DandelionSprout: https://github.com/DandelionSprout
.. _@dnmTX: https://github.com/dnmTX
Expand Down

0 comments on commit 22d39cf

Please sign in to comment.