diff --git a/tensorflow/python/kernel_tests/string_lower_op_test.py b/tensorflow/python/kernel_tests/string_lower_op_test.py
index 8650dfb0c0e..1ed32ee099e 100644
--- a/tensorflow/python/kernel_tests/string_lower_op_test.py
+++ b/tensorflow/python/kernel_tests/string_lower_op_test.py
@@ -49,7 +49,8 @@ class StringLowerOpTest(test.TestCase):
     with self.cached_session() as sess:
       output = string_ops.string_lower(strings, encoding='utf-8')
       output = self.evaluate(output)
-      self.assertAllEqual(output, [[b"óósschloë"]]),
+      # output: "óósschloë"
+      self.assertAllEqual(output, [[b"\xc3\xb3\xc3\xb3sschlo\xc3\xab"]])
 
 
 if __name__ == "__main__":
diff --git a/tensorflow/python/kernel_tests/string_upper_op_test.py b/tensorflow/python/kernel_tests/string_upper_op_test.py
index 1edc303ba60..dc14cb9be73 100644
--- a/tensorflow/python/kernel_tests/string_upper_op_test.py
+++ b/tensorflow/python/kernel_tests/string_upper_op_test.py
@@ -49,7 +49,8 @@ class StringUpperOpTest(test.TestCase):
     with self.cached_session() as sess:
       output = string_ops.string_upper(strings, encoding='utf-8')
       output = self.evaluate(output)
-      self.assertAllEqual(output, [[b"ÓÓSSCHLOË"]]),
+      # output: "ÓÓSSCHLOË"
+      self.assertAllEqual(output, [[b"\xc3\x93\xc3\x93SSCHLO\xc3\x8b"]])
 
 
 if __name__ == "__main__":