You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@codehaus.org> on 2013/11/17 13:48:45 UTC

[jira] (DOXIA-386) Snippet Macro: Reference file does not support UTF-8 file format to generate the page garbage

     [ https://jira.codehaus.org/browse/DOXIA-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov updated DOXIA-386:
---------------------------------

    Assignee: Michael Osipov
    
> Snippet Macro:  Reference file does not support UTF-8 file format to generate the page garbage
> ----------------------------------------------------------------------------------------------
>
>                 Key: DOXIA-386
>                 URL: https://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
>            Assignee: Michael Osipov
>
> {code:xml}
>         <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>
> {code}
> my sample apt file:
> {noformat}
> %{snippet|file=target/site/reference/html/sample.html|verbatim=false}
> {noformat}
> sample.html:
> {code:xml}
> <?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>&#20013;&#25991;</title></head><body></body></html>
> {code}
> {{org.apache.maven.doxia.macro.snippet.SnippetReader}}
> readLines:
> {code}
>  reader = new BufferedReader(new InputStreamReader(source.openStream()));
> {code}
> use {{InputStreamReader(InputStream in)}}
> change to:
> {code}
>  InputStreamReader(InputStream in, Charset cs)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira