Commit 060472a8 authored by Vitja Makarov's avatar Vitja Makarov

Add encoding prefix to string identifier, ticket #770

parent c7919539
......@@ -644,9 +644,16 @@ class StringConst(object):
prefix = Naming.interned_str_prefix
else:
prefix = Naming.py_const_prefix
pystring_cname = "%s%s_%s" % (
if encoding_key:
encoding_prefix = '_%s' % encoding_key
else:
encoding_prefix = ''
pystring_cname = "%s%s%s_%s" % (
prefix,
(is_str and 's') or (is_unicode and 'u') or 'b',
encoding_prefix,
self.cname[len(Naming.const_prefix):])
py_string = PyStringConst(
......
# encoding: koi8-r
# mode: run
# ticket: 740
"""
>>> wtf
'wtf'
"""
wtf = 'wtf'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment