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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2009, 11:25 AM   #1
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Calibre, Astak Pocket Pro, and foreign languages. Help!

Hi all.

Newcomer here, just got my Astak PP and started using Calibre. I bought the Astak PP because I heard that it had built in foreign language support and I mainly want to use it to read Chinese and Japanese. So, I use Calibre to fetch Chinese and Japanese news sites (using the built in recipe for the Chinese one and just using the Japanese RSS sites), but it comes up as ??? for all of my news pulls.

The files are converted to epub but are not displaying correctly on the Astak. The files do display correctly on my computer however. I have updated my firmware, but I'm not sure as to what I should do from here. Converting the files to PDF makes them readable, but I'd rather have them in epub and use the automatic fetching and conversion feature of Calibre. Can anyone help me out?

Last edited by megabadd; 12-10-2009 at 11:27 AM.
megabadd is offline   Reply With Quote
Old 12-10-2009, 10:49 PM   #2
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Update:

So, I can read Japanese .txts fine, and ONE of my Japanese news site feeds comes in ok (yomiuri) (The news stories' text are fine, but the table of contents is ???). However, the other two japanese feeds and the chinese news feed is nothing but ???.

In terms of figuring out trends, my generally working yomiuri rss comes from here: http://rss.yomiuri.co.jp/rss/yol/topstories, while my other news sites come from .xml files like: http://feeds.lifehacker.jp/rss/lifehacker/index.xml

Could it be that the other sites are xml that is messing me up?

Last edited by megabadd; 12-10-2009 at 11:05 PM.
megabadd is offline   Reply With Quote
Advert
Old 12-10-2009, 11:50 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to make sure the character encoding settings in the recipe are correct
kovidgoyal is offline   Reply With Quote
Old 12-11-2009, 12:02 AM   #4
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Hi, thanks for the response.

With the Zaobao Chinese news fetch script, the encoding cmd is:

encoding = 'gbk'

And for the Japanese ones I'm using the basic fetching script. What should I be setting my encoding to?
megabadd is offline   Reply With Quote
Old 12-11-2009, 12:06 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you have to look atthe html files that the recipe is downloading to figure out what the encoding should be
kovidgoyal is offline   Reply With Quote
Advert
Old 12-11-2009, 12:55 AM   #6
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Quote:
Originally Posted by kovidgoyal View Post
you have to look atthe html files that the recipe is downloading to figure out what the encoding should be
I looked at the view page info for the sites giving me trouble and they said they were decoded with 'utf-8'. I added that to my script and I still got ??? gibberish on my ereader but it looked fine on my computer.
megabadd is offline   Reply With Quote
Old 12-11-2009, 08:36 AM   #7
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Changing encoding to:
encoding = 'utf-8'
made no difference on my reader. It was still readable on the epub reader on my computer.
megabadd is offline   Reply With Quote
Old 12-11-2009, 08:16 PM   #8
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Comparing the non working japanese blog to the working one:

For the non working feed:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>仕事場探訪:ガラスデスクとMacは相性良し : ライフハッカー[日本版], 仕事も生活も上手くこなすライフハック情報満載のブログ・メディア</title>
<meta name="keywords" content="APPLE, MICROSOFT, WEBツール, お役立ちアイテム, フリーソフト, ブラウザ, 仕事術, 恋愛術, 豆知識 などなど"/>

For the working one:

<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<meta http-equiv="Content-Script-Type" content="text/javascript"/>
<meta name="articleID" content="20091212-OYT1T00113"/>
<!--// title_start //-->

EDIT: YES!

Just adding xml:lang="ja" lang="ja" to the head of the other html file and then re-zipping in worked. However, in my recipe I have the language = 'ja' but after it finished pulling it had lang = 'en'. Is there any way for me to change the recipe to effect this change in my news feeds?

Last edited by megabadd; 12-11-2009 at 08:25 PM.
megabadd is offline   Reply With Quote
Old 12-12-2009, 06:31 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can use the postprocess_html function to explicitly set the lang in the html
kovidgoyal is offline   Reply With Quote
Old 12-12-2009, 08:27 AM   #10
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Quote:
Originally Posted by kovidgoyal View Post
You can use the postprocess_html function to explicitly set the lang in the html
Thank you for the help.

I've looked through the user manual and can't figure out how the code should look to override/text the language. I'm not terribly technical, so do you think you could help me out here?
megabadd is offline   Reply With Quote
Old 12-12-2009, 11:18 AM   #11
dmyrick
Junior Member
dmyrick began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2009
Device: sony prs-505
Have Vista running and keep getting this error when I try to load Calibre:

An error occurred during the installation of assembly 'Microsoft.VC90CRT,version="9.0.21022.8",publickey Token="1fc8b3b9a1e8e3b",processorArchitecture="x86 "'type="win32".Please refer to help and supprt for more information.

And I have no idea what this means....well actually I do, it means no calibre on my vista. Works okay on my work computer, but its XP. Ideas? Surely its my gateway laptop? What do I do?
dmyrick is offline   Reply With Quote
Old 12-12-2009, 01:19 PM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error means installing one of the dependencies needed by calibre is failing. You can try installing it manually before installing calibre from here

http://www.microsoft.com/downloads/d...displaylang=en
kovidgoyal is offline   Reply With Quote
Old 12-12-2009, 01:20 PM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@megabadd

You need to add the following to your recipe

Code:
def postprocess_html(self, soup, f):
   soup.find('html')['lang'] = 'ja'
   return soup
kovidgoyal is offline   Reply With Quote
Old 12-12-2009, 03:01 PM   #14
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Quote:
Originally Posted by kovidgoyal View Post
@megabadd

You need to add the following to your recipe

Code:
def postprocess_html(self, soup, f):
   soup.find('html')['lang'] = 'ja'
   return soup
Added to my recipe, no change.
megabadd 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
calibre settings for output to astak pocket pro oncdoc Calibre 1 05-04-2010 11:42 PM
Calibre not seeing SD card in Astak EZReader Pocket Pro animedude01 Calibre 13 03-27-2010 09:34 PM
Ended Astak Pocket Pro kennyc Flea Market 3 01-17-2010 05:41 PM
Calibre, Astak PP, and foreign languages. Help! megabadd Astak EZReader 23 12-11-2009 08:37 PM
Does Calibre recognize the Astak Pocket Pro? kennyc Calibre 50 11-23-2009 12:32 AM


All times are GMT -4. The time now is 12:55 AM.


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