View Single Post
Old 09-21-2009, 01:04 PM   #70
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
The python logging module at least in 2.x has various unicode related bugs, so I had to implement a custom logging module for calibre as well.

I recently refactored the calibre RTF parser to fix its speed issues, so I'm ok for now. Incidentally, the RTF parser actually output XML which I then convert to HTML using an XSLT stylesheet. It handles a pretty large subset of the RTF 1.5 spec including embedded images and so on. My philosophy in calibre is to accept as large an input set as possible and do *something* with it, even if that something may not be optimal, so untill your RTF parser handles a larger set of input, I think I'll pass.
Makes sense.

In your custom logging module, do you have something that reliably down-converts unicode to plain ascii that can be printed even to dumb DOS terminals?

- Ahi
ahi is offline   Reply With Quote