diff --git a/src/property_parser.py b/src/property_parser.py index 58a875d1d..577003b5a 100644 --- a/src/property_parser.py +++ b/src/property_parser.py @@ -85,6 +85,9 @@ def read_multiline_value(file, line_num, filename): lines = [''] # We return with a beginning newline # Re-looping over the same iterator means we don't repeat lines for line_num, line in file: + if isinstance(line, bytes): + # Decode bytes using utf-8 + line = line.decode('utf-8') line = line.strip() if line.endswith('"'): lines.append(line[:-1]) @@ -614,6 +617,7 @@ def export(self): for prop in self.value: yield from prop.export() else: + yield '"' + self.real_name + '"\n' yield '\t{\n' yield from ( '\t' + line