Store CFF names in UTF-8
We switched XML encoding from Latin-1 to UTF-8. Adjust CFF code.
This commit is contained in:
parent
4d99d14dec
commit
8c5c966471
@ -672,6 +672,11 @@ class SimpleConverter:
|
||||
return attrs["value"]
|
||||
|
||||
class Latin1Converter(SimpleConverter):
|
||||
def xmlWrite(self, xmlWriter, name, value, progress):
|
||||
# Store as UTF-8
|
||||
value = unicode(value, "latin-1").encode("utf-8")
|
||||
xmlWriter.simpletag(name, value=value)
|
||||
xmlWriter.newline()
|
||||
def xmlRead(self, (name, attrs, content), parent):
|
||||
s = unicode(attrs["value"], "utf-8")
|
||||
return s.encode("latin-1")
|
||||
|
Loading…
x
Reference in New Issue
Block a user