maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptahch...@apache.org
Subject svn commit: r1695142 - /maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Date Mon, 10 Aug 2015 18:00:00 GMT
Author: ptahchiev
Date: Mon Aug 10 18:00:00 2015
New Revision: 1695142

URL: http://svn.apache.org/r1695142
Log:
Check for user's provided encoding, and only if it's null then use the encoding of the xml
document. Closes [DOXIASITETOOLS-104]

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java

Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java?rev=1695142&r1=1695141&r2=1695142&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Mon Aug 10 18:00:00 2015
@@ -389,7 +389,14 @@ public class DefaultSiteRenderer
                 switch ( parser.getType() )
                 {
                     case Parser.XML_TYPE:
-                        reader = ReaderFactory.newXmlReader( doc );
+                        if ( siteContext.getInputEncoding() != null )
+                        {
+                            reader = ReaderFactory.newReader( doc, siteContext.getInputEncoding()
);
+                        }
+                        else
+                        {
+                            reader = ReaderFactory.newXmlReader( doc );
+                        }
                         if ( siteContext.isValidate() )
                         {
                             reader = validate( reader, resource );



Mime
View raw message