def generate_includes(self, env, cimported_modules, code):
includes = []
for filename in env.include_files:
- code.putln('#include "%s"' % filename)
+ # fake decoding of filenames to their original byte sequence
+ code.putln('#include "%s"' % filename.as_unicode())
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.
+ """
+ return self.decode('ISO-8859-1')
+
is_unicode = False
char_from_escape_sequence = {