Skip to content

Commit

Permalink
Fix Thumbnail Generation (#6598)
Browse files Browse the repository at this point in the history
* Specify encoding for opening files.
Required to support emojis

* Updated changelog

* Revert "Updated changelog"

This reverts commit 8ef5539.
  • Loading branch information
gabryelreyes authored Jul 30, 2024
1 parent 28615cd commit 9dc232d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/generate_thumbnails.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

def search_and_replace(filename, fromString, toString):
"""Search and replace string in a file."""
with open(filename, 'r') as file:
with open(filename, 'r', encoding="utf-8") as file:
data = file.read()
data = data.replace(fromString, toString)
with open(filename, 'w') as file:
with open(filename, 'w', encoding="utf-8") as file:
file.write(data)


Expand Down

0 comments on commit 9dc232d

Please sign in to comment.