View Single Post
Old 10-13-2010, 09:01 AM   #1
spaceniuzai
Junior Member
spaceniuzai began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle 3
Problem with Chinese news feeds on Kindle 3

Calibre is really fantastic. My gratitude to the developers for such a wonderful program.

I have some problem with news feeds in Chinese. I tried all the Chinese news receipts that comes with Calibre (version 0.7.23). The content of the news read fine but the lists of the news (the screen with the news titles and short summaries) are scrambled. The font is not displayed properly. I suspect this has something to do with the language coding and country settings. I tried several configurations but couldn’t get it work. I attached the news receipt from the built-in BBC Chinese. Any help will be highly appreciated.

BTW, I am using Kindle 3 (wifi) and I changed my locale to zh-CN as discussed in this thread (https://www.mobileread.com/forums/showthread.php?t=99078).

Built-in BBC Chinese news receipt:

from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1277443634(BasicNewsRecipe):
title = u'BBC Chinese zh-CN'
oldest_article = 7
max_articles_per_feed = 100
feeds = [
(u'\u4e3b\u9875', u'http://www.bbc.co.uk/zhongwen/simp/index.xml'),
(u'\u56fd\u9645\u65b0\u95fb', u'http://www.bbc.co.uk/zhongwen/simp/world/index.xml'),
(u'\u4e24\u5cb8\u4e09\u5730', u'http://www.bbc.co.uk/zhongwen/simp/china/index.xml'),
(u'\u91d1\u878d\u8d22\u7ecf', u'http://www.bbc.co.uk/zhongwen/simp/business/index.xml'),
(u'\u7f51\u4e0a\u4e92\u52a8', u'http://www.bbc.co.uk/zhongwen/simp/interactive/index.xml'),
(u'\u97f3\u89c6\u56fe\u7247', u'http://www.bbc.co.uk/zhongwen/simp/multimedia/index.xml'),
(u'\u5206\u6790\u8bc4\u8bba', u'http://www.bbc.co.uk/zhongwen/simp/indepth/index.xml')
]

extra_css = '''
@font-face {font-family: "DroidFont", serif, sans-serif; src: url(res:///system/fonts/DroidSansFallback.ttf); }\n
body {margin-right: 8pt; font-family: 'DroidFont', serif;}\n
h1 {font-family: 'DroidFont', serif;}\n
.articledescription {font-family: 'DroidFont', serif;}
'''

__author__ = 'rty'
__version__ = '1.0'
language = 'zh-CN'
pubisher = 'British Broadcasting Corporation'
description = 'BBC news in Chinese'
category = 'News, Chinese'

remove_javascript = True
use_embedded_content = False
no_stylesheets = True
encoding = 'UTF-8'
conversion_options = {'linearize_tables':True}
masthead_url = 'http://wscdn.bbc.co.uk/zhongwen/simp/images/1024/brand.jpg'
keep_only_tags = [
dict(name='h1'),
dict(name='p', attrs={'class':['primary-topic','summary']}),
dict(name='div', attrs={'class':['bodytext','datestamp']}),
]
spaceniuzai is offline   Reply With Quote