Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mdmaug
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
20
Issues
20
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CSIRT
mdmaug
Commits
c3e84053
Commit
c3e84053
authored
Dec 17, 2018
by
Edvard Rejthar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scan failed when well-hidden encoding bug came at the scene
parent
60d80fa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mdmaug/bin/firefox_mdmaug_writer.py
mdmaug/bin/firefox_mdmaug_writer.py
+2
-2
No files found.
mdmaug/bin/firefox_mdmaug_writer.py
View file @
c3e84053
...
...
@@ -27,5 +27,5 @@ while True:
else
:
method
=
"w"
files_encountered
.
add
(
file
)
with
open
(
file
,
method
)
as
f
:
f
.
write
(
message
[
"text"
])
with
open
(
file
,
method
+
"b"
)
as
f
:
# without writing as bytes, some pages end up with UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 197: ordinal not in range(128)
f
.
write
(
message
[
"text"
]
.
encode
(
"utf-8"
)
)
Write
Preview
Markdown
is supported
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