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>&#20013;&#25991;</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

        

Reply via email to