summaryrefslogtreecommitdiff
path: root/hercules
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-02 15:32:31 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-02 15:32:31 +0300
commit9f83711c0af352b4331d97ad1b09520cf8000ef3 (patch)
treed8fffbf3f3903cb0271d7feb1e426065bd126782 /hercules
parenta6b6a2e85f9f8aa7ddade816d0f328c3b2ce0a8b (diff)
downloadtools-9f83711c0af352b4331d97ad1b09520cf8000ef3.tar.gz
tools-9f83711c0af352b4331d97ad1b09520cf8000ef3.tar.bz2
tools-9f83711c0af352b4331d97ad1b09520cf8000ef3.tar.xz
tools-9f83711c0af352b4331d97ad1b09520cf8000ef3.zip
hercules: remove BOM flags from source files.
Diffstat (limited to 'hercules')
-rw-r--r--hercules/code/stringutils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/hercules/code/stringutils.py b/hercules/code/stringutils.py
index 0bcfaa7..73db611 100644
--- a/hercules/code/stringutils.py
+++ b/hercules/code/stringutils.py
@@ -3,6 +3,8 @@
# Copyright (C) 2014 Evol Online
# Author: Andrei Karas (4144)
+import codecs
+
def stripQuotes(data):
if len(data) == 0:
return data
@@ -43,6 +45,7 @@ def stripWindows(data):
data = data[:-1]
if len(data) > 1 and data[-2] == "\r":
data = data[:-2] + data[-1]
+ data = data.replace(codecs.BOM_UTF8, "", 1)
return data
def escapeSqlStr(data):