Doxygen中文显示乱码问题

所用版本为doxygen1.8.0

 

注释中含有中文,生成的html显示为乱码。为解决该问题,查找了doxgen的帮助手册。

doxgen的配置中有一系列输入相关的选项(Input related options),其中有一选项为INPUT_ENCODING。doxgen手册中的描述为:

INPUT_ENCODING This tag can be used to specify the character encoding of the source files that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. See the libiconv documentation for the list of possible encodings.

INPUT_ENCODING 用于指定doxygen要解析的源文件的字符编码方式。doxygen内部使用UTF-8编码,也是默认的输入编码。Doxygen用libiconv (or the iconv built into libc) 来进行编码转换。可以查询libiconv documentation中可能的编码列表。

我用的是GUI来设置doxygen的配置,即doxywizard。

打开doxywizard,Expert --> Input,会在左侧看到选项INPUT_ENCODING,将其设为:GB2312。设置好后,该选项会变成红色。

然后再重新运行,得到的html中的中文则不会再显示乱码了。

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值