在哪里可以指定我的javadoc文档字符集? [英] Where can I specify my javadoc document charset?

查看:187
本文介绍了在哪里可以指定我的javadoc文档字符集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用波兰语编写javadoc,我想为我的eclipse生成的javadoc文档定义UTF-8字符集 - 我如何和在哪里可以做?

I'm writing javadoc in Polish language and I want to define UTF-8 charset for my javadoc documentation generated by eclipse - how and where can I do that?

推荐答案

Javadoc有三个相关选项:

There are three relevant options for Javadoc:


  • -encoding 选项表示源文件的编码。这应该是你的源文件实际编码的(和编译器应该使用相同的 -encoding 选项)。您可以使用 \uXXXX 约定对不在此编码字符集中的字符进行编码。 (还有一些人认为你不应该在你的源代码中使用US-ASCII以外的字符,以使它可移植。)现在,UTF-8已经很好了。)

  • The -encoding option indicates the encoding of the source files. This should be whatever your sources files are actually encoded in (and the compiler should use the same -encoding option). You can encode characters which are not in the character set of this encoding using the \uXXXX convention. (And there are some people which argue you should never use characters outside of US-ASCII in your source code, to make it portable. I think nowadays UTF-8 is fine.)

-docencoding 选项指示在写出HTML文件时要使用的编码。用于生成的HTML而不是字符集中的字符将替换为&#...; 等效字符。

- charset 选项指示要在< META http-equiv =Content-Typecontent =text / html; charset = ...

The -charset option indicates what to write in the <META http-equiv="Content-Type" content="text/html; charset=..."> tag in the header of the generated HTML files.

这篇关于在哪里可以指定我的javadoc文档字符集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆