Remove null bytes before dumping to XML. This seems neccesary, but I'm not sure if this breaks compilation.

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@54 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
Just 2000-01-05 20:45:38 +00:00
parent 1be8095808
commit 599cc2fdf5

View File

@ -5,9 +5,13 @@ import DefaultTable
class asciiTable(DefaultTable.DefaultTable):
def toXML(self, writer, ttFont):
data = self.data
# removing null bytes. XXX needed??
data = string.split(data, '\0')
data = string.join(data, '')
writer.begintag("source")
writer.newline()
writer.write_noindent(string.replace(self.data, "\r", "\n"))
writer.write_noindent(string.replace(data, "\r", "\n"))
writer.newline()
writer.endtag("source")
writer.newline()