You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Geelen <st...@hotmail.com> on 2004/03/02 20:04:40 UTC

XInclude and UTF-16 encoding

Hi,

I build a webpage with  default charset=ISO-8859-1" encoding.

I need to include another .xml file built in utf-16 encoding:

          <xi:include href="Example_box.mill" parse="text" encoding="UTF-16">
            <xi:fallback>
              <p>Example currently unavailable</p>
            </xi:fallback>
          </xi:include>

The result is :
..
 &yuml;&thorn;&lt;&#0;?&#0;x&#0;m&#0;l&#0; &#0;v&#0;e&#0;r&#0;s&#0;i&#0;o&#0;n&#0;=&#0;"&#0;1&#0;.&#0;0&#0;"&#0; 
 &#0;e&#0;n&#0;c&#0;o&#0;d&#0;i&#0;n&#0;g&#0;=&#0;"&#0;U&#0;T&#0;F&#0;-&#0;1&#0;6&#0;"&#0;?&#0;&gt;&#0;&#13;&#0; 
&#0;&lt;&#0;m&#0;l&#0;:&#0;d&#0;o&#0;c&#0;u&#0;m&#0;e&#0;n&#0;t&#0;s&#0; 
&#0;x&#0;m&#0;l&#0;n&#0;s&#0;:&#0;m&#0;l&#0;=&#0;"&#0;h&#0;t&#0;t&#0;p&#0;:&#0;/&#0;/&#
..

Appareantly the file is not recognized as UTF-16. 

Note: UTF-8 seems to work.

Stefan

Re: XInclude and UTF-16 encoding

Posted by Joerg Heinicke <jo...@gmx.de>.
On 02.03.2004 20:04, Stefan Geelen wrote:

> Hi,
> 
> I build a webpage with  default charset=ISO-8859-1" encoding.
> 
> I need to include another .xml file built in utf-16 encoding:
> 
>           <xi:include href="Example_box.mill" parse="text" encoding="UTF-16">
>             <xi:fallback>
>               <p>Example currently unavailable</p>
>             </xi:fallback>
>           </xi:include>
> 
> The result is :
> ..
>  &yuml;&thorn;&lt;&#0;?&#0;x&#0;m&#0;l&#0; &#0;v&#0;e&#0;r&#0;s&#0;i&#0;o&#0;n&#0;=&#0;"&#0;1&#0;.&#0;0&#0;"&#0; 
>  &#0;e&#0;n&#0;c&#0;o&#0;d&#0;i&#0;n&#0;g&#0;=&#0;"&#0;U&#0;T&#0;F&#0;-&#0;1&#0;6&#0;"&#0;?&#0;&gt;&#0;&#13;&#0; 
> &#0;&lt;&#0;m&#0;l&#0;:&#0;d&#0;o&#0;c&#0;u&#0;m&#0;e&#0;n&#0;t&#0;s&#0; 
> &#0;x&#0;m&#0;l&#0;n&#0;s&#0;:&#0;m&#0;l&#0;=&#0;"&#0;h&#0;t&#0;t&#0;p&#0;:&#0;/&#0;/&#
> ..
> 
> Appareantly the file is not recognized as UTF-16. 

Must the other file not specify encoding="UTF-16" in its XML 
declaration? From where the file, where the other one is included, shall 
now from in which encoding the other one is?

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XInclude and UTF-16 encoding

Posted by Bruno Dumon <br...@outerthought.org>.
On Tue, 2004-03-02 at 20:04, Stefan Geelen wrote:
> Hi,
>  
> I build a webpage with  default charset=ISO-8859-1" encoding.
>  
> I need to include another .xml file built in utf-16 encoding:
>  
>           <xi:include href="Example_box.mill" parse="text"
> encoding="UTF-16">
>             <xi:fallback>
>               <p>Example currently unavailable</p>
>             </xi:fallback>
>           </xi:include>
>  
> The result is :
> ...
>  &yuml;&thorn;&lt;&#0;?&#0;x&#0;m&#0;l&#0;
> &#0;v&#0;e&#0;r&#0;s&#0;i&#0;o&#0;n&#0;=&#0;"&#0;1&#0;.&#0;0&#0;"&#0; 
> &#0;e&#0;n&#0;c&#0;o&#0;d&#0;i&#0;n&#0;g&#0;=&#0;"&#0;U&#0;T&#0;F&#0;-&#0;1&#0;6&#0;"&#0;?&#0;&gt;&#0;&#13;&#0; 
> &#0;&lt;&#0;m&#0;l&#0;:&#0;d&#0;o&#0;c&#0;u&#0;m&#0;e&#0;n&#0;t&#0;s&#0; 
> &#0;x&#0;m&#0;l&#0;n&#0;s&#0;:&#0;m&#0;l&#0;=&#0;"&#0;h&#0;t&#0;t&#0;p&#0;:&#0;/&#0;/&#
> ...
>  
> Appareantly the file is not recognized as UTF-16. 
>  
> Note: UTF-8 seems to work.

I just checked the XIncludeTransformer source and it doesn't seem like
the encoding attribute is implemented, which explains why it's not
working.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org