Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fachrat Informatik
pter
Commits
483a6586
Commit
483a6586
authored
Jun 17, 2020
by
Dominik Woiwode
Browse files
Add utf-8-encoding in file reading
parent
031bb0a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
linkToPDF.py
View file @
483a6586
...
...
@@ -172,7 +172,7 @@ class Pad:
if
not
self
.
inCache
():
self
.
download
()
with
open
(
self
.
getRawFilename
(),
"r"
)
as
d
:
with
open
(
self
.
getRawFilename
(),
"r"
,
encoding
=
"utf-8"
)
as
d
:
return
d
.
read
()
def
convert
(
self
):
...
...
@@ -205,7 +205,7 @@ def compilePads(pads):
def
allPads
(
pads
,
topsOnly
=
False
):
mergedFilename
=
"merged_topics.md"
with
open
(
mergedFilename
,
"w"
)
as
d
:
with
open
(
mergedFilename
,
"w"
,
encoding
=
"utf-8"
)
as
d
:
for
pad
in
tqdm
(
sorted
(
pads
,
key
=
lambda
p
:
p
.
date
),
desc
=
"Create Topics Document"
):
assert
isinstance
(
pad
,
Pad
)
content
=
pad
.
getContent
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment