[
http://jira.codehaus.org/browse/DOXIA-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222162#action_222162
]
Lukas Theussl commented on DOXIA-386:
-------------------------------------
Problem is there is no direct way to pass the encoding to the parser. This
needs a more general solution.
> Snippet Macro: Reference file does not support UTF-8 file format to generate
> the page garbage
> ----------------------------------------------------------------------------------------------
>
> Key: DOXIA-386
> URL: http://jira.codehaus.org/browse/DOXIA-386
> Project: Maven Doxia
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.2
> Environment: windows7 zh_CN
> Reporter: pinghe
>
> <plugin>
> <artifactId>maven-site-plugin</artifactId>
> <version>2.1</version>
> <configuration>
> <locales>zh_CN</locales>
> <inputEncoding>UTF-8</inputEncoding>
> <outputEncoding>UTF-8</outputEncoding>
> </configuration>
> </plugin>
> my sample apt file:
> %{snippet|file=target/site/reference/html/sample.html|verbatim=false}
> sample.html:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html
> xmlns="http://www.w3.org/1999/xhtml"><head><title>中文</title></head><body></body></html>
> org.apache.maven.doxia.macro.snippet.SnippetReader
> readLines:
> reader = new BufferedReader(new InputStreamReader(source.openStream()));
> use InputStreamReader(InputStream in)
> change to:
> InputStreamReader(InputStream in, Charset cs)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira