html转换成chm乱码,【全部解决】用Docbook生成htmlhelp + 【完全解决】生成的chm中标题和左边的索引目录是乱码的问题...

本文档详细记录了使用Docbook生成HTMLHelp过程中遇到的乱码问题及解决方案。通过调整Docbook的配置,使用xsltproc生成HTMLHelp文件,并利用iconv进行编码转换,最终成功解决了chm文件中标题和索引目录的乱码问题。
摘要由CSDN通过智能技术生成

【背景】

已经实现用docbook生成单个和多个HTML了。

但是希望输出的文件是一个完全单个文件,而之前的输出的单个的HTML文件,其图片文件是另外的,不是包含在HTML文件里面的。

所以,就去找这些的东西。

【解决过程】

1.本来是以为完全单个的HTML是xhtml的。

后来发现搞错了,完全单个的HTML是mht类型文件。

2.后来又看到了docbook输出支持htmlhelp文件,即html类型的帮助文件,所以又去折腾用docbook输出为htmlhelp文件。<?xml version='1.0'?>

/p>

[

]

>

version='1.0'>

encoding="UTF-8"

indent="no"/>

用命令生成htmlhelp:CLi@PC-CLI-1 ~/develop/docbook/books/VBR/VBR/src

$ XML_CATALOG_FILES="/home/CLi/develop/docbook/config/catalog/catalog.xml" \

> XML_DEBUG_CATALOG=1 \

> xsltproc.exe --xinclude -o ../output/htmlhelp/MPEG_VBR.html docbook_htmlhelp_crl.xsl MPEG_VBR.xml

Resolve: sysID docbook_htmlhelp_crl.xsl

-2147483592 Parsing catalog /home/CLi/develop/docbook/config/catalog/catalog.xml

/home/CLi/develop/docbook/config/catalog/catalog.xml added to file hash

Resolve URI docbook_htmlhelp_crl.xsl

Found URI match docbook_htmlhelp_crl.xsl

Resolve: pubID crl.ent sysID null

Found public match crl.ent

Writing pr01s02.html for section

Writing pr01.html for preface(preface)

Writing ch01s02.html for sect1

Writing ch01s03.html for sect1

Writing ch01s04.html for sect1

Writing ch01s05.html for sect1

Writing ch01.html for chapter(ch01_mpeg_related)

Writing ch02s02.html for sect1

Writing ch02s03.html for sect1

Writing ch02s04.html for sect1

Writing ch02s05.html for sect1

Writing ch02s06.html for sect1

Writing ch02s07.html for sect1

Writing ch02s08.html for sect1

Writing ch02.html for chapter(ch02_mp3_term.xml)

Writing ch03s02.html for sect1

Writing ch03s03.html for sect1

Writing ch03.html for chapter(ch03_mpeg_frame.xml)

Writing ch04s02.html for sect1

Writing ch04.html for chapter(ch04_xing_vbri.xml)

Writing ch05s02.html for sect1

Writing ch05s03.html for sect1

Writing ch05.html for chapter(ch05_calc_duration.xml)

Writing ch06s02.html for sect1

Writing ch06s03.html for sect1

Writing ch06s04.html for sect1

Writing ch06.html for chapter(ch06_mp3_related.xml)

Writing ch07.html for chapter(ch07_after_content.xml)

Writing bi01.html for bibliography(reference)

Writing index.html for book

Writing htmlhelp.hhp

Writing toc.hhc

Catalogs cleanup

Free catalog entry crl.ent

Free catalog entry /home/CLi/develop/docbook/tools/docbook-xsl-ns-1.76.1/

Free catalog entry docbook_html.xsl

Free catalog entry docbook_fo.xsl

Free catalog

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值