![]() |
#1 |
Enthusiast
![]() 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. |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,209
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to make sure the character encoding settings in the recipe are correct
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() 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? |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,209
Karma: 27110894
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
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
|
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.
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() 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. |
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() 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. |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,209
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can use the postprocess_html function to explicitly set the lang in the html
|
![]() |
![]() |
![]() |
#10 | |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
|
Quote:
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? |
|
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() 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? |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,209
Karma: 27110894
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 |
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,209
Karma: 27110894
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 |
![]() |
![]() |
![]() |
#14 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |