Skip to content

Commit

Permalink
support for mac encoding of files
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 11, 2016
1 parent 6e1628f commit 3a2ff0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/admin_scripts/base/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def convert_encoding(
# checks if the file already has the target encoding
string_value = file.read()
string_value = string_value.replace(b"\r\n", b"\n")
string_value = string_value.replace(b"\r", b"\n")
has_target_encoding = has_encoding(string_value, target_encoding)

# in case the retrieved string value starts with the bom
Expand Down

0 comments on commit 3a2ff0f

Please sign in to comment.