View Single Post
Old 04-23-2007, 02:48 PM   #14
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by ashkulz
Don't know if it will help you, but you can look at the code for generating LRF files for PDFRead (look at the LrfOutput class, line 182).
Thanks for the pointers, I'll give it a go.

Now another questions...

I have code to generate UTF-16 smart quotes, which I would want to embed into pylrs. I noted that just pre-pending a "u" to a string flags it as UTF-16, from the (super ultra crappy) Python reference I used. Problem is, this foregoes any algorithmic conversion. EG...

text = u"This is text";

But I need to scan the text and look for preceding and following characters to decide which curly-quote to apply (open or close). Once a string has the "u" prepended, I have no idea what I'm dealing with.

My lack of python knowledge really shows here. So let me break this down into two basic questions.

(1) Where would I parse text and convert it to UTF-16?

(2) Is there a GOOD Python reference on the Internet? The one I used was the Python Library Reference, is literally the worse documentation I've seen, ever! (http://docs.python.org/lib/lib.html).

I really prefer makelrf3, but I have several bugs (and lack of features) that makes pylrs look far more viable... if I can just figure out how to parse a string to apply my curly-quotes algorithm.

-Pie
EatingPie is offline   Reply With Quote