Python 2.7 requires the "u" prefix.

This commit is contained in:
Anthony Tuininga 2017-07-08 21:23:27 -06:00
parent 21213a89ca
commit 1d768706ab
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class TestConnection(TestCase):
def testDifferentEncodings(self):
connection = cx_Oracle.connect(self.username, self.password,
self.tnsentry, encoding = "UTF-8", nencoding = "UTF-16")
value = "\u03b4\u4e2a"
value = u"\u03b4\u4e2a"
cursor = connection.cursor()
ncharVar = cursor.var(cx_Oracle.NCHAR, 100)
ncharVar.setvalue(0, value)