Patching previous commit

This commit is contained in:
Miroslav Stampar
2015-11-16 16:59:54 +01:00
parent 94639d11a3
commit 4335ae8330
4 changed files with 2 additions and 15 deletions

View File

@@ -8,7 +8,6 @@ See the file 'doc/COPYING' for copying permission
import binascii
from lib.core.convert import utf8encode
from lib.core.settings import DEFAULT_MYSQL_CHARACTER_SET
from plugins.generic.syntax import Syntax as GenericSyntax
class Syntax(GenericSyntax):
@@ -27,7 +26,7 @@ class Syntax(GenericSyntax):
try:
retVal = "0x%s" % binascii.hexlify(value)
except UnicodeEncodeError:
retVal = "CONVERT(0x%s USING %s)" % ("".join("%.2x" % ord(_) for _ in utf8encode(value)), DEFAULT_MYSQL_CHARACTER_SET)
retVal = "CONVERT(0x%s USING utf8)" % "".join("%.2x" % ord(_) for _ in utf8encode(value))
return retVal
return Syntax._escape(expression, quote, escaper)