Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2007, 10:27 AM   #1
Falstaff
Member
Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.
 
Posts: 21
Karma: 289
Join Date: Dec 2006
Device: Sony eReader
MSH_LrsParser does not like my file

When I try to compile the attached file using MSH_LrsParser, I get an EUnicodeReaderReadError. Lrs2lrf will read the file and create an lrf. So, does anyone have any idea what is wrong with my file?

I made the file from a python program. As far as I can tell, there is not really a Uncode problem.

Falstaff
Attached Files
File Type: zip test1.zip (2.0 KB, 286 views)
Falstaff is offline   Reply With Quote
Old 01-19-2007, 11:50 AM   #2
obelix
Connoisseur
obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.
 
Posts: 64
Karma: 1695
Join Date: Oct 2006
Quote:
Originally Posted by Falstaff
When I try to compile the attached file using MSH_LrsParser, I get an EUnicodeReaderReadError. Lrs2lrf will read the file and create an lrf. So, does anyone have any idea what is wrong with my file?

I made the file from a python program. As far as I can tell, there is not really a Uncode problem.

Falstaff
Your file contains reference to thumbnail file (image):
<CThumbnail file="1984_thumb.jpeg" />


Parser needs this file to compile the LRF, that is why there is an error.
Last version of parser does not require thumbnail image at all, so if you simply remove the above line from lrs, you will get the LRF without any problems. Alternatively, put "1984_thumb.jpeg" to the folder where you run MSH_LRSParser.

P.S. Also there is some unicode error in the file. You can easily fix it by opening the lrs file in the WordPad and saving it back.

Last edited by obelix; 01-19-2007 at 01:28 PM.
obelix is offline   Reply With Quote
Old 01-19-2007, 01:33 PM   #3
Falstaff
Member
Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.
 
Posts: 21
Karma: 289
Join Date: Dec 2006
Device: Sony eReader
Sorry, I meant to include the jpeg file. I've attached it. Even with the file in the same directory, I get the error message. The same file is compiled by the "regular" lrs2lrf without any errors.

Is there some tag or attribute that the program expects that I don't have that would trigger this error?
Attached Images
 

Last edited by Falstaff; 01-19-2007 at 01:37 PM.
Falstaff is offline   Reply With Quote
Old 01-19-2007, 01:39 PM   #4
Falstaff
Member
Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.
 
Posts: 21
Karma: 289
Join Date: Dec 2006
Device: Sony eReader
Or cou;ld it be related to the location of the file on disk? I have simply copied the parser to a directory on my disk -- does it have to go in a certain location or does it expect other files to be found? In the directions, it said to copy it to a certain subdirectory of the librie software, but I don't have that software...
Falstaff is offline   Reply With Quote
Old 01-19-2007, 03:03 PM   #5
obelix
Connoisseur
obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.
 
Posts: 64
Karma: 1695
Join Date: Oct 2006
Quote:
Originally Posted by Falstaff
Sorry, I meant to include the jpeg file. I've attached it. Even with the file in the same directory, I get the error message. The same file is compiled by the "regular" lrs2lrf without any errors.

Is there some tag or attribute that the program expects that I don't have that would trigger this error?
I cannot get your jpg file.

Do the following:
1. Put in one folder your lrs, the picture (1984_thumb.jpeg) and MSH_LRSParser
2. Open lrs, do nothing but save (to the same name, it will fix the unicode error)
3. run the parser.

I did it myself and it works (I used some replacement to your jpg file)

Last edited by obelix; 01-19-2007 at 03:06 PM.
obelix is offline   Reply With Quote
Old 01-19-2007, 04:41 PM   #6
Falstaff
Member
Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.
 
Posts: 21
Karma: 289
Join Date: Dec 2006
Device: Sony eReader
Thank you for your help. I'd really like to use your parser. The editor I am using saves the exact bytes of the file back -- so I get the same error. Could you post the lrs file after you have saved it so I can see the difference (and generate it correctly in the first place?)
Falstaff is offline   Reply With Quote
Old 01-20-2007, 09:02 AM   #7
obelix
Connoisseur
obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.obelix once ate a cherry pie in a record 7 seconds.
 
Posts: 64
Karma: 1695
Join Date: Oct 2006
I found the reason. In one place of the code parser expected #13#10 at the end of the line (actually this is not needed in unicode, just bug of one of the test versions).

Your editor do not put #13 at the end (just #10) that is why there was a problem. When I did open-save, WordPad inserted #13 at the end and problem dissapeared. But it does not work for you, because you are using different editor.

OK, Now I fixed the parser and it does not rely to any nonunicode characters.
Should work now.
www.msh-tools.com/ebook/MSH_LRSParser.zip
obelix is offline   Reply With Quote
Old 01-20-2007, 02:17 PM   #8
Falstaff
Member
Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.
 
Posts: 21
Karma: 289
Join Date: Dec 2006
Device: Sony eReader
Thank you, it works perfectly now. I am testing some pretty large lrs files, so you have saved me a lot of time by making such a fast parser. Plus, now I can use an embedded font!

Thanks again.
Falstaff is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i convert HTML or txt file to EPUB file ? guguqiaqia ePub 7 05-28-2010 09:15 PM
Secure .PDB file to file Kindle will read! Help! mbtravis63 Kindle Formats 2 01-17-2010 04:20 AM
File management: how to copy file from USB stick? Lec0mte iRex 5 05-04-2009 07:19 AM
Book designer and MSH_LRSParser alexxxm Sony Reader 3 01-12-2008 11:18 AM
Book designer and MSH_LRSParser alexxxm Sony Reader 3 01-11-2008 04:49 AM


All times are GMT -4. The time now is 09:28 AM.


MobileRead.com is a privately owned, operated and funded community.