From: Stefan Behnel Date: Sat, 24 Oct 2009 13:43:24 +0000 (+0200) Subject: fix identifier decoding check X-Git-Tag: 0.13.beta0~2^2~119^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=20de226f37daaa9fed6bf37a2a0de784c3bf164a;p=cython.git fix identifier decoding check --- 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: