如何为一些带有波斯字符的代码生成 javadoc?

How to generate javadoc for some codes with persian characters?

我的项目中硬编码了某些字段的一些值。当我将 maven javadoc 插件添加到我的 pom 文件时,在 "maven clean install" 之后出现错误:

unmappable character for encoding Cp1252
[ERROR] *?????º???? ?ª????????????????

javadoc 有什么方法不会给出错误吗?

注意:我已将此添加到插件中:

              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                <charset>UTF-8</charset>
                    <docencoding>UTF-8</docencoding>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

最后我找到了解决方案:应该在 javadoc 插件配置中添加编码。

    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
        <encoding>UTF-8</encoding>
    </configuration>