Index: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
===================================================================
--- doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java	(revision 690942)
+++ doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java	(working copy)
@@ -24,7 +24,9 @@
 
 import org.apache.maven.doxia.macro.MacroExecutionException;
 import org.apache.maven.doxia.markup.XmlMarkup;
+import org.apache.maven.doxia.sink.AbstractXmlSink;
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkAdapter;
 import org.apache.maven.doxia.sink.SinkEventAttributeSet;
 
 import org.codehaus.plexus.util.xml.pull.MXParser;
@@ -54,8 +56,26 @@
 
             sink.enableLogging( getLog() );
 
+            if ( AbstractXmlSink.class.isAssignableFrom( sink.getClass() ) )
+            {
+                AbstractXmlSink xmlSink = (AbstractXmlSink) sink;
+
+                SinkAdapter sinkAdapter = new SinkAdapter();
+                parseXml( parser, sinkAdapter );
+
+                xmlSink.setInputEncoding( parser.getInputEncoding() );
+
+                source.reset();
+                parser = new MXParser();
+                parser.setInput( source );
+            }
+
             parseXml( parser, sink );
         }
+        catch ( IOException ex )
+        {
+            throw new ParseException( "Error parsing the model: " + ex.getMessage(), ex );
+        }
         catch ( XmlPullParserException ex )
         {
             throw new ParseException( "Error parsing the model: " + ex.getMessage(), ex, ex.getLineNumber(), ex
Index: doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
===================================================================
--- doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java	(revision 690942)
+++ doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java	(working copy)
@@ -38,6 +38,9 @@
     /** Default namespace prepended to all tags */
     private String nameSpace;
 
+    /** Input encoding */
+    private String inputEncoding;
+
     /**
      * Sets the default namespace that is prepended to all tags written by this sink.
      *
@@ -59,6 +62,26 @@
     }
 
     /**
+     * Sets the input encoding.
+     *
+     * @param encoding the encoding.
+     */
+    public void setInputEncoding( String inputEncoding )
+    {
+        this.inputEncoding = inputEncoding;
+    }
+
+    /**
+     * Return the input encoding.
+     *
+     * @return the encoding, if specified.
+     */
+    public String getInputEncoding()
+    {
+        return this.inputEncoding;
+    }
+
+    /**
      * Starts a Tag. For instance:
      * <pre>
      * &lt;tag&gt;
Index: doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
===================================================================
--- doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java	(revision 690942)
+++ doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java	(working copy)
@@ -102,6 +102,16 @@
     /** {@inheritDoc} */
     public void head_()
     {
+        System.out.println( "head_"+getInputEncoding());
+        if ( getInputEncoding() != null )
+        {
+            MutableAttributeSet att = new SinkEventAttributeSet();
+            att.addAttribute( Attribute.HTTPEQUIV, "content-type" );
+            att.addAttribute( Attribute.CONTENT, "text/html; charset=" + getInputEncoding() );
+
+            writeSimpleTag( Tag.META, att );
+        }
+
         setHeadFlag( false );
 
         writeEndTag( Tag.HEAD );
