includes = []
for filename in env.include_files:
# fake decoding of filenames to their original byte sequence
- code.putln('#include "%s"' % filename.as_unicode())
+ code.putln('#include "%s"' % filename)
def generate_filename_table(self, code):
code.putln("")
def utf8encode(self):
assert False, "this is not a unicode string: %r" % self
- def as_unicode(self):
- """Returns a Unicode sequence that matches the byte sequence
- of this literal.
+ def __str__(self):
+ """Fake-decode the byte string to unicode to support %
+ formatting of unicode strings.
"""
return self.decode('ISO-8859-1')