# \[GoldenDict\] 添加词典时提示“读取词典出错（vector::reserve）”

**URL:** <https://forum.freemdict.com/t/topic/34914>\
**Category:** 技术交流与词典编修\
**Tags:** mdx, goldendict, 求助\
**Created:** [2024 年12 月 16 日 17:44 UTC](https://forum.freemdict.com/t/topic/34914 "2024-12-16T17:44:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 16 日 17:44 UTC](https://forum.freemdict.com/t/topic/34914/1 "2024-12-16T17:44:46Z")

</div>

尝试添加自己制作的两部mdx词典时GoldenDict报错（MDict正常），可能是什么原因？

 ![1734371051756(1)](https://forumcdn.freemdict.com/uploads/default/original/3X/f/a/fa0fe9d52978efd36129bf00c77086f65cb38773.png)

> [@《圣经百科辞典：图文版》（图片词典）](http://forum.freemdict.com/t/topic/34834/10):
>
> [思高圣经学会编《圣经辞典》（文字版）.zip](https://forum.freemdict.com/uploads/short-url/bHbU0SInmMvxJbO2aGtltTX8QKq.zip) (4.7 MB)

> [@《圣经百科辞典：图文版》（图片词典）](http://forum.freemdict.com/t/topic/34834/13):
>
> [思高简体圣经.zip](https://forum.freemdict.com/uploads/short-url/AkRqwiiaClaRKRprvMX95oKpLBZ.zip) (3.0 MB)

---

<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)\
发布日期： [2024 年12 月 16 日 23:09 UTC](https://forum.freemdict.com/t/topic/34914/2 "2024-12-16T23:09:49Z")

</div>

把文件名、文件夹名改成简短的英文试试看。不要太长，不要有空格，最重要的是不用软件忌讳的字。

文件名、文件夹名假如有奇特的字、软件禁用的字，都可能出差错。

---

<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)\
发布日期： [2024 年12 月 17 日 02:27 UTC](https://forum.freemdict.com/t/topic/34914/3 "2024-12-17T02:27:18Z")

</div>

你生成的 mdx 的 3.0 格式，需要使用 2.0 的生成器，或者直接使用：

> **[GitHub - liuyug/mdict-utils: MDict pack/unpack/list/info tool](https://github.com/liuyug/mdict-utils)**
>
> MDict pack/unpack/list/info tool

---

<div class="post-metadata">

作者： ![茕鬼爱折腾](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/%E8%8C%95/90ced4/32.png) [@茕鬼爱折腾](https://forum.freemdict.com/u/%E8%8C%95%E9%AC%BC%E7%88%B1%E6%8A%98%E8%85%BE)\
发布日期： [2024 年12 月 17 日 02:31 UTC](https://forum.freemdict.com/t/topic/34914/4 "2024-12-17T02:31:18Z")

</div>

刚下了你说的两个词典，还没导入，那我是要导入还是不导呢，在线等结果.

---

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 17 日 09:25 UTC](https://forum.freemdict.com/t/topic/34914/6 "2024-12-17T09:25:36Z")

</div>

> [@shaoshi](#):
>
> 把文件名、文件夹名改成简短的英文试试看。不要太长，不要有空格，最重要的是不用软件忌讳的字。
> 
> 文件名、文件夹名假如有奇特的字、软件禁用的字，都可能出差错。

应该不至于吧，我就只放了 mdx 进 content 目录。

---

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 17 日 09:26 UTC](https://forum.freemdict.com/t/topic/34914/7 "2024-12-17T09:26:28Z")

</div>

> [@茕鬼爱折腾](#):
>
> 刚下了你说的两个词典，还没导入，那我是要导入还是不导呢，在线等结果.

你可以试试，要是不行再从 content 文件夹删掉就可以了，不影响。

---

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 17 日 09:28 UTC](https://forum.freemdict.com/t/topic/34914/8 "2024-12-17T09:28:41Z")

</div>

mdx 的 2.0、3.0 格式，是指 MdxBuilder 版本吗？

> [@對於 mdxbuilder 不同版本的 疑問](http://forum.freemdict.com/t/topic/5688/2):
>
> 4.0 beta制作的mdx，除了mdict之外，其他的词典软件都无法读取。  
> 用mdxbulider 3.0就行了

---

<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)\
发布日期： [2024 年12 月 17 日 10:20 UTC](https://forum.freemdict.com/t/topic/34914/9 "2024-12-17T10:20:40Z")

</div>

用 mdxbulider 3.0 制作就可以了，生成的是 2.0 的格式。

---

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 17 日 10:27 UTC](https://forum.freemdict.com/t/topic/34914/10 "2024-12-17T10:27:53Z")

</div>

> [@last\_idol](#):
>
> 用 mdxbulider 3.0 制作就可以了，生成的是 2.0 的格式。

我记得我是很久之前在论坛上下载的非 4.0 版本。我刚才又去重新下载了一次，还是不行。

> [@【阿彌陀佛】词典制作工具备份，欢迎补充](http://forum.freemdict.com/t/topic/1724):
>
> 01 Exce表格转TXT文本工具ExcelToTxtP-这个我并不使用[01 Exce表格转TXT文本工具ExcelToTxtP.zip](https://forum.freemdict.com/uploads/short-url/nVvuJt94wupMFL9W8HhVYli2r8r.zip) (409.7 KB) 以下是常用的： 02、 TXT源文件转MDX工具 附教程[MdxBuilder3.0.zip](https://forum.freemdict.com/uploads/short-url/psEzNMO76qXQzAREjWQtPPJ8a6A.zip) (2.5 MB) 03 将 MDict 词典的 mdx 格式转为 txt 格式工具 [MdxExport3.5-MDX与MDD资源导出小工具.z…](https://forum.freemdict.com/uploads/short-url/vPyMXQMrWa0RpqJK1nxkKcy80HA.zip)

---

<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)\
发布日期： [2024 年12 月 17 日 10:48 UTC](https://forum.freemdict.com/t/topic/34914/11 "2024-12-17T10:48:12Z")

</div>

把你新生成的格式传上来我看看。

---

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 17 日 10:58 UTC](https://forum.freemdict.com/t/topic/34914/12 "2024-12-17T10:58:33Z")

</div>

> [@last\_idol](#):
>
> 把你新生成的格式传上来我看看。

[思高简体圣经.zip](https://forum.freemdict.com/uploads/short-url/ab4yn77AgdntYOGfKfyxsN720hK.zip) (3.1 MB)

---

<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)\
发布日期： [2024 年12 月 17 日 11:15 UTC](https://forum.freemdict.com/t/topic/34914/13 "2024-12-17T11:15:09Z")

</div>

你这次生成的格式版本是 2.0 的，但是编码用的 GBK，你需要把文本文件的编码改成 UTF-8 无 BOM 格式。

---

<div class="post-metadata">

作者： ![格蕾特](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%A0%BC%E8%95%BE%E7%89%B9/32/69955_2.png) [@格蕾特](https://forum.freemdict.com/u/%E6%A0%BC%E8%95%BE%E7%89%B9)\
发布日期： [2024 年12 月 17 日 11:37 UTC](https://forum.freemdict.com/t/topic/34914/14 "2024-12-17T11:37:07Z")

</div>

解决了，感谢！  
总结一下解决办法：使用 MdxBuilder 3.0 制作，选择 UTF-8 编码。

 ![1734435384289](https://forumcdn.freemdict.com/uploads/default/original/3X/8/4/84d63c4a8852e5b999fa6f786d6c07662050e281.png)

> [@【阿彌陀佛】词典制作工具备份，欢迎补充](http://forum.freemdict.com/t/topic/1724/1):
>
> 01 Exce表格转TXT文本工具ExcelToTxtP-这个我并不使用[01 Exce表格转TXT文本工具ExcelToTxtP.zip](https://forum.freemdict.com/uploads/short-url/nVvuJt94wupMFL9W8HhVYli2r8r.zip) (409.7 KB) 以下是常用的： 02、 TXT源文件转MDX工具 附教程[MdxBuilder3.0.zip](https://forum.freemdict.com/uploads/short-url/psEzNMO76qXQzAREjWQtPPJ8a6A.zip) (2.5 MB) 03 将 MDict 词典的 mdx 格式转为 txt 格式工具 [MdxExport3.5-MDX与MDD资源导出小工具.z…](https://forum.freemdict.com/uploads/short-url/vPyMXQMrWa0RpqJK1nxkKcy80HA.zip)
