# Mdx 打包软件哪个好

**URL:** <https://forum.freemdict.com/t/topic/21988>\
**Category:** 技术交流与词典编修\
**Tags:** mdx, 技术\
**Created:** [2023 年7 月 5 日 01:13 UTC](https://forum.freemdict.com/t/topic/21988 "2023-07-05T01:13:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

作者： ![Mandolin](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mandolin/32/4948_2.png) [@Mandolin](https://forum.freemdict.com/u/Mandolin)\
发布日期： [2023 年7 月 5 日 01:13 UTC](https://forum.freemdict.com/t/topic/21988/1 "2023-07-05T01:13:30Z")

</div>

目前已知有三种打包 mdx 的方式：

1. MdxBuilder.exe (Version 3.0)
2. MdxBuilder.exe (Version 4.0)
3. [mdict-utils](https://github.com/liuyug/mdict-utils) (Version 3, Python)

前两种是官方打包工具，其中用 4.0 版本打包后似乎不可逆，那么暂且只讨论第 1 和第 3 种打包方式的差异，第 1 种是官方打包程序，用它打包的词典使用上肯定没问题，本人一直在使用，不过有以下三点不足：

1. **单个 mdd 文件不能太大** （太大的话词典程序读不出来），本人测试的结果是最大 1 G左右；
2. 只有UI界面方式，没有设置文本，不能通过读取设置来预设参数；（.cfg 文件应该就是，但本人发现有时不灵，不知道怎么回事）
3. **不支持命令行**

然后就是上面的 Python 打包方式，是三方逆向解析的， **因为担心有缺陷一直没使用过** 。按理说 Python 的打包方式是最灵活，可以多实例运行，还可以嵌入自己的程序实现自动打包。看坛子里也有不少同好使用的是 Python 打包方式，如果确实没问题的话，那 Python 打包方式是不是值得广泛使用。

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年7 月 5 日 01:33 UTC](https://forum.freemdict.com/t/topic/21988/2 "2023-07-05T01:33:23Z")

</div>

mdict-utils似乎不支持style.txt？

atauzki: compatHTML格式的mdx用mdict-utils无法解压出style.txt，并且mdict-utils只支持UTF8编码

> [@新手指南：怎样编辑mdx？](https://forum.freemdict.com/t/topic/16431/28):
>
> 补充一点，compatHTML格式的mdx用mdict-utils无法解压出style.txt，并且mdict-utils只支持UTF8编码

比较少人用的主要原因，大概是因为不容易用。

---

<div class="post-metadata">

作者： ![Mandolin](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mandolin/32/4948_2.png) [@Mandolin](https://forum.freemdict.com/u/Mandolin)\
发布日期： [2023 年7 月 5 日 02:37 UTC](https://forum.freemdict.com/t/topic/21988/3 "2023-07-05T02:37:31Z")

</div>

> [@shaoshi](#):
>
> UTF8编码

UTF8编码的问题好说，compatHTML 应该也很少有人用吧，那这两个问题影响不大。

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年7 月 5 日 02:43 UTC](https://forum.freemdict.com/t/topic/21988/4 "2023-07-05T02:43:46Z")

</div>

《汉语大词典》、《国语辞典》都有compatHTML。wfg特别爱用compatHTML。

Mastameta: the only issues I’ve had were due to accidentally using utf-8 with BOM.

> [@Mdict-utils与官方工具的区别](https://forum.freemdict.com/t/topic/15752/6):
>
> Thank you so much! Yes, it is indeed the BOM issue that caused the compile problem. Now I have converted the source file into the utf-8 without BOM, and everything is compiled successfully. Here is …

所有文件都使用 UTF8。不能提取编码是UTF16的mdx内容。

> [@使用mdict-utils遇到的一个问题](https://forum.freemdict.com/t/topic/15957/5):
>
> 对的，这其实也暴露出这个工具的一个缺点，不能提取编码是UTF16的mdx内容

---

<div class="post-metadata">

作者： ![Mandolin](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mandolin/32/4948_2.png) [@Mandolin](https://forum.freemdict.com/u/Mandolin)\
发布日期： [2023 年7 月 5 日 02:51 UTC](https://forum.freemdict.com/t/topic/21988/5 "2023-07-05T02:51:04Z")

</div>

总结一下就是：compatHTML、UTF-16 编码格式，都是解包的问题，打包目前发现的问题就是只支持 Windows 换行且 utf-8 无 bom 的格式

所以打包几乎没啥大问题，是这样理解吧

暂时只关注打包功能，打包出来的mdx词典，各大词典软件比如 mdict、GoldenDict、深蓝、欧陆 都能用，和官方无差别，那就行了

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2023 年7 月 5 日 02:55 UTC](https://forum.freemdict.com/t/topic/21988/6 "2023-07-05T02:55:46Z")

</div>

mdict-utils 在欧路上偶尔会和官方打包的排序不一致，我当时猜是在某个符号上处理不一致，也不是什么大问题。

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2023 年7 月 5 日 02:57 UTC](https://forum.freemdict.com/t/topic/21988/7 "2023-07-05T02:57:42Z")

</div>

谁能给wfg提个建议，不要用compatHTML了，而且所有样式都写在html里，别人几乎没法改，使用css就容易定制了。
