Closed ofri closed 10 years ago
Man, how did I miss this for so long? Sorry.
Is ignoring missing fonts really the right behaviour here? I'm wondering if it should fall back to cp1252 instead.
What sort of text is in fontNum=0 blocks in your RTFs?
I can't seem to reproduce this now, using 0.5.6. Could it be that some other change fixed it? fixes in reading charset table maybe?
My intension was not to ignore the text in the missing font, but to ignore the font switch. I assumed that if I don't execute the self.charset assignment, i'll just be using some default/fallback charset.
You'd be using whatever charset the containing block was in, while I'm guessing fontNum=0 should indeed be the default charset, cp1252.
Have you tested it on the same files you were having problems with before? If so, I'll close this.
Some RTFs contain fontNum=0 without declaring it, which makes the RtfReader fail. I didn't really read the RTF specs, so accept my appologies in advance if this bug in the RTFs is illegal and should actually fail the parsing. I found many of these RTFs in the Israeli Knesset website which I use pyth to read.