# Mdict-utils与官方工具的区别

**URL:** <https://forum.freemdict.com/t/topic/15752>\
**Category:** 技术交流与词典编修\
**Created:** [2022 年9 月 28 日 00:44 UTC](https://forum.freemdict.com/t/topic/15752 "2022-09-28T00:44:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

作者： ![epistularum](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/epistularum/32/31135_2.png) [@epistularum](https://forum.freemdict.com/u/epistularum)\
发布日期： [2022 年9 月 28 日 00:44 UTC](https://forum.freemdict.com/t/topic/15752/1 "2022-09-28T00:44:56Z")

</div>

Is there a reason why mdict-utils should not be used over the official conversion tools? I have read people talking about stripkey but I am not sure what it is.

The reason I am asking that is that I realized that MDXBuilder re-orders all entries on export. mdict-utils allows you to have a custom order for entries, that way it is possible to display the most frequent word on top of others when displayed in a dictionary viewer like goldendict. Is there a reason this should not be done?

有什么理由不应该在官方转换工具上使用mdict-utils吗？我读过人们谈论脱衣舞，但我不确定它是什么。

我之所以这么问，是因为我意识到MDXBuilder在导出时对所有条目进行了重新排序。mdict-utils允许您对条目进行自定义排序，这样，当在goldendict等字典查看器中显示时，就可以在其他单词的前面显示最常用的单词。有没有理由不这样做？

---

<div class="post-metadata">

作者： ![Mastameta](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mastameta/32/8240_2.png) [@Mastameta](https://forum.freemdict.com/u/Mastameta)\
发布日期： [2022 年9 月 28 日 13:48 UTC](https://forum.freemdict.com/t/topic/15752/2 "2022-09-28T13:48:37Z")

</div>

mdict utils all the way. no indexing bugs and everything can be automated using .bat files. dict entries also allow line breaks, which is nice for simple edits

---

<div class="post-metadata">

作者： ![mdxfan](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mdxfan/32/31774_2.png) [@mdxfan](https://forum.freemdict.com/u/mdxfan)\
发布日期： [2022 年9 月 28 日 13:58 UTC](https://forum.freemdict.com/t/topic/15752/3 "2022-09-28T13:58:37Z")

</div>

最近打包OED，mdict-utils出错，好像与utf-8转码有关，懒得排查，最后还是使用官方大文件版工具了。

For the OP: I am not expert in this, but I use mdict-utils a lot in packing the dicts. Usually I do not notice significant difference.

---

<div class="post-metadata">

作者： ![Mastameta](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mastameta/32/8240_2.png) [@Mastameta](https://forum.freemdict.com/u/Mastameta)\
发布日期： [2022 年9 月 28 日 14:12 UTC](https://forum.freemdict.com/t/topic/15752/4 "2022-09-28T14:12:12Z")

</div>

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

---

<div class="post-metadata">

作者： ![mdxfan](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mdxfan/32/31774_2.png) [@mdxfan](https://forum.freemdict.com/u/mdxfan)\
发布日期： [2022 年9 月 28 日 14:25 UTC](https://forum.freemdict.com/t/topic/15752/5 "2022-09-28T14:25:38Z")

</div>

> [@Mastameta](#):
>
> the only issues I’ve had were due to accidentally using utf-8 with BOM.

Ι see. I will chek the BOM. Thank you so much for the hint.

---

<div class="post-metadata">

作者： ![mdxfan](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/mdxfan/32/31774_2.png) [@mdxfan](https://forum.freemdict.com/u/mdxfan)\
发布日期： [2022 年9 月 28 日 14:46 UTC](https://forum.freemdict.com/t/topic/15752/6 "2022-09-28T14:46:27Z")

</div>

> [@Mastameta](#):
>
> the only issues I’ve had were due to accidentally using utf-8 with BOM.

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 my conclusion from this little bug: please make sure that all the source files are prepared in utf-8 WITHOUT BOM.

BTW:  
I am always keeping the line endings as the UNIX LF (“\n”), I am not sure whether this is necessary or not.

---

<div class="post-metadata">

作者： ![epistularum](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/epistularum/32/31135_2.png) [@epistularum](https://forum.freemdict.com/u/epistularum)\
发布日期： [2022 年9 月 29 日 01:15 UTC](https://forum.freemdict.com/t/topic/15752/7 "2022-09-29T01:15:20Z")

</div>

Thank you very much for clarifying things up! I am glad I can stop using mdxbuilder and can start using something much more flexible and open source without worrying about errors down the line.

I will make extra care to not use BOM (perhaps it is worth opening an issue on github?).  
Concerning the line endings, I am on linux already so it shouldn’t be a problem like it was when using mdxbuilder.

---

<div class="post-metadata">

作者： ![endnote](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/e/9de0a6/32.png) [@endnote](https://forum.freemdict.com/u/endnote)\
发布日期： [2022 年9 月 29 日 05:46 UTC](https://forum.freemdict.com/t/topic/15752/8 "2022-09-29T05:46:03Z")

</div>

For me, mdict-utils always works as intended. I like it.

The `.mdx` format is lack of an official specification for a long time. After various unofficial implementations from both compiling and rendering sides, now `.mdx` format is loosely defined, which is kind of regretful.

---

<div class="post-metadata">

作者： ![epistularum](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/epistularum/32/31135_2.png) [@epistularum](https://forum.freemdict.com/u/epistularum)\
发布日期： [2022 年9 月 29 日 06:32 UTC](https://forum.freemdict.com/t/topic/15752/9 "2022-09-29T06:32:57Z")

</div>

The fact that it is not officially documented but rather reverse engineered is why I was afraid that the resulting file could be buggy/not working as intended in small ways. It is really not the kind of thing I want to learn down the line as I do not want to recompile every thing (or even possibly lose data).
