Skip to content

Commit

Permalink
Fix issue linickx#10 - read/write text file notes as utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed May 22, 2022
1 parent a6236b7 commit 2467c62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simplenote_sync/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, config, logger):

def write(self, note, filename, access_time):
try:
f = open(filename, 'w')
f = open(filename, 'w', encoding='utf-8')
f.write(note['content'])
f.close()
self.log.info("Writing %s", filename)
Expand Down Expand Up @@ -163,7 +163,7 @@ def open(self, filename):

if os.path.isfile(path + "/" + filename):
try:
f = open(path + "/" + filename, 'r')
f = open(path + "/" + filename, 'r', encoding='utf-8')
notefile['content'] = f.read()
f.close()
except:
Expand Down

0 comments on commit 2467c62

Please sign in to comment.