You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "powercom (Jira)" <ji...@apache.org> on 2021/08/26 07:26:00 UTC
[jira] [Created] (FREEMARKER-187) Ant javadoc failed in windows
environment
powercom created FREEMARKER-187:
------------------------------------
Summary: Ant javadoc failed in windows environment
Key: FREEMARKER-187
URL: https://issues.apache.org/jira/browse/FREEMARKER-187
Project: Apache Freemarker
Issue Type: Bug
Components: docgen
Affects Versions: 2.3.31
Environment: operating system: window10
jdk: openjdk version "1.8.0_302"
Reporter: powercom
I am a freemarker user from China, my operating system is window10. I execute this command (ant javadoc) in CMD environment, got the following error:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source files for package freemarker.cache...
[javadoc] Loading source files for package freemarker.core...
[javadoc] D:\20_Git\OpenSource\freemarker\build\javadoc-sources\freemarker\core\DefaultTruncateBuiltinAlgorithm.java:90: 错误: 编码GBK的不可映射字符
[javadoc] * ellipsis character (\{@code "鈥?"}, U+2026), and thus only works with UTF-8, and the cp125x charsets (like
[javadoc] ^
[javadoc] Loading source files for package freemarker.debug...
[javadoc] Loading source files for package freemarker.ext.ant...
[javadoc] Loading source files for package freemarker.ext.beans...
[javadoc] Loading source files for package freemarker.ext.dom...
[javadoc] Loading source files for package freemarker.ext.jdom...
[javadoc] Loading source files for package freemarker.ext.jsp...
[javadoc] Loading source files for package freemarker.ext.jython...
[javadoc] Loading source files for package freemarker.ext.rhino...
[javadoc] Loading source files for package freemarker.ext.servlet...
[javadoc] Loading source files for package freemarker.ext.util...
[javadoc] Loading source files for package freemarker.ext.xml...
[javadoc] Loading source files for package freemarker.log...
[javadoc] Loading source files for package freemarker.template...
[javadoc] Loading source files for package freemarker.template.utility...
[javadoc] 1 error
Then I modify the target _rawjavadoc in build.xml file, add `encoding = "UTF-8"` to the javadoc command to solve the problem
<javadoc
sourcepath="build/javadoc-sources"
destdir="build/api"
doctitle="FreeMarker ${version}"
packagenames="
freemarker.debug, freemarker.template.*,
freemarker.core.*, freemarker.ext.*,
freemarker.cache.*, freemarker.log.*"
use="true"
version="true"
author="true"
windowtitle="FreeMarker ${version} API"
classpath="build/classes"
classpathref="ivy.dep"
failonerror="true"
charset="UTF-8"
docencoding="UTF-8"
*encoding="UTF-8"*
locale="en_US"
>
the Differences in javadoc options:
-charset <charset> Charset for cross-platform viewing of generated documentation.
*-encoding <name> Source file encoding name*
-docencoding <name> Specify the character encoding for the output
--
This message was sent by Atlassian Jira
(v8.3.4#803005)