View previous topic :: View next topic |
Author |
Message |
qeese
Joined: 19 Apr 2006 Posts: 5
小企鹅: 10
|
Posted: 2006-May-16 Tue, pm2:29 |
|
Post subject: [原创]修改justreader的中文文件名问题和汉化 |
|
justreader是很好的看书软件,但好象2004年后就没有更新了.我发现有一个不爽的地方,不能打开中文名的palm格式的文件,开始我以为是不支持palm格式的电子书,后来发现只要把文件名改为英文字母就能打开.下了源码看了后发现问题出在StreamPalmTXT等几个类的openFile方法上,在openFile方法中有这样的代码
strncpy(plucker_file,(filepath+"\0").latin1(),(filepath+"\0").length()+1);
strncpy(out_char,out_file.latin1(),out_file.length()+1);
strncpy(rim_char,rim_file.latin1(),rim_file.length()+1);
latin1()只保留拉丁字母,中文编码会被丢掉,这就是不能打开中文文件名palm格式文件的原因,把第一句改为
qstrcpy(plucker_file,QTextCodec::codecForName("UTF-8")->fromUnicode(filepath));
可以解决这个问题.justreader把palm格式分为五种,需要修改五个文件.
还有一个问题,按说明justreader可以支持mobipocket格式的电子书,但打不开用最新的4.0版制作的电子书,原因在新的mobipocket电子书的标识已经改了.需要修改makedoc9.cpp这个文件.在文件中有
if (strncmp("DataPlkr",thisDocHeader.magic, == 0) docType = 1;
else if(strncmp("TEXtREAd",thisDocHeader.magic, == 0) docType = 2;
这两句语句.改为
if (strncmp("DataPlkr",thisDocHeader.magic, == 0) docType = 1;
else if(strncmp("TEXtREAd",thisDocHeader.magic, == 0 ||
strncmp("BOOKMOBI",thisDocHeader.magic, == 0) docType = 2;
这样就可以打开4.0版制作的电子书,打开的时候注意编码的选择,如果在制作时选utf-8,在justreader打开时编码就选utf-8.把格式选为html,感觉不错,选为mobipocket也可以,不过在开始的地方有不能识别的格式. |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
qeese
Joined: 19 Apr 2006 Posts: 5
小企鹅: 10
|
Posted: 2006-May-18 Thu, am12:22 |
|
Post subject: |
|
改过的justreader,部分汉化 |
|
Back to top |
|
ioiomi
Joined: 20 Apr 2006 Posts: 83
小企鹅: 8
|
Posted: 2006-May-18 Thu, am12:24 |
|
Post subject: |
|
好厉害,严重支持 |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
ioiomi
Joined: 20 Apr 2006 Posts: 83
小企鹅: 8
|
Posted: 2006-May-18 Thu, pm12:48 |
|
Post subject: |
|
我的中文已搞定 |
|
Back to top |
|
helio
Joined: 21 May 2006 Posts: 1
小企鹅: 0
|
Posted: 2006-May-21 Sun, pm2:52 |
|
Post subject: |
|
qeese,太感谢了,给我看电子书解决了大问题。 |
|
Back to top |
|
qeese
Joined: 19 Apr 2006 Posts: 5
小企鹅: 10
|
Posted: 2006-May-22 Mon, am11:04 |
|
Post subject: Re: Justreader的翻译 |
|
ccpaging wrote: | Pics scaling图片缩放
Progress as %进度百分比
Pack Pics 无图片?
Misc其它
下面不应该是内建字典,而是缺省搜索目录(就是放书的地方)
Bar Color1进度条前景
Bar Color2进度条背景
Search Highlight搜索关键字
goback回退
另请教,用z的滚轮翻页总是翻过头,能不能设置迟钝些? |
多谢送分,其实现在那个qm文件是从金蜂那个汉化版里拿来的,我现在还不知道怎么产生qm文件,我的机子并没有翻过头的现象,没仔细看过代码,不知道能不能设得更迟钝。 |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
qeese
Joined: 19 Apr 2006 Posts: 5
小企鹅: 10
|
Posted: 2006-May-22 Mon, pm11:50 |
|
Post subject: |
|
菜单已汉化
汉化了打开文件窗口,重新上传附件。
Last edited by qeese on 2006-May-24 Wed, am2:50; edited 1 time in total |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
Posted: 2006-May-23 Tue, am11:57 |
|
Post subject: |
|
谢谢楼主,测试过了,感觉不错。
我用simsun 18号/20号看文本小说,效果能好。
ibmccr的文件列表
2006-05-23 11:51 <DIR> .
2006-05-23 11:51 <DIR> ..
2000-12-11 12:00 2,887 FAQ.txt
2000-12-11 12:00 3,742 License.txt
2000-12-11 12:00 2,419 Readme.1st
2000-12-11 12:00 462 author.txt
2000-12-11 12:00 151 history.txt
2000-12-11 12:00 111,296 ibmccr
2006-05-23 11:51 <DIR> lib
2006-05-23 11:51 0 list.txt
7 个文件 120,957 字节
lib 目录
2006-05-23 11:51 <DIR> .
2006-05-23 11:51 <DIR> ..
2000-12-11 12:00 653,826 ibmbase.dat
2000-12-11 12:00 2,374,176 ibmmain.dat
2000-12-11 12:00 86,737 ibmatom.dat
3 个文件 3,114,739 字节 _________________ SL-C1000, 1G CF, 1G SD
pdaxrom 1.1beta3
Roku Wifi Card(Used in Cacko 1.23 & pdaXrom 1.1 Beta3)
http://ccpaging.blog.ubuntu.org.cn/
http://ccpaging.osall.com/
http://blog.sina.com.cn/zaurus/ |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
|