From 20de226f37daaa9fed6bf37a2a0de784c3bf164a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 24 Oct 2009 15:43:24 +0200 Subject: [PATCH] fix identifier decoding check --- Cython/Compiler/ExprNodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 8130a56e..863e54ba 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -926,8 +926,8 @@ class StringNode(PyConstNode): self.check_for_coercion_error(dst_type, fail=True) # this will be a unicode string in Py3, so make sure we can decode it - if not self.is_identifier: - encoding = self.value.encoding or 'UTF-8' + if self.value.encoding: + encoding = self.value.encoding try: self.value.decode(encoding) except UnicodeDecodeError: -- 2.26.2