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 :
..
ÿþ<�?�x�m�l� �v�e�r�s�i�o�n�=�"�1�.�0�"�
�e�n�c�o�d�i�n�g�=�"�U�T�F�-�1�6�"�?�>� �
�<�m�l�:�d�o�c�u�m�e�n�t�s�
�x�m�l�n�s�:�m�l�=�"�h�t�t�p�:�/�/&#
..
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 :
> ..
> ÿþ<�?�x�m�l� �v�e�r�s�i�o�n�=�"�1�.�0�"�
> �e�n�c�o�d�i�n�g�=�"�U�T�F�-�1�6�"�?�>� �
> �<�m�l�:�d�o�c�u�m�e�n�t�s�
> �x�m�l�n�s�:�m�l�=�"�h�t�t�p�:�/�/&#
> ..
>
> 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 :
> ...
> ÿþ<�?�x�m�l�
> �v�e�r�s�i�o�n�=�"�1�.�0�"�
> �e�n�c�o�d�i�n�g�=�"�U�T�F�-�1�6�"�?�>� �
> �<�m�l�:�d�o�c�u�m�e�n�t�s�
> �x�m�l�n�s�:�m�l�=�"�h�t�t�p�:�/�/&#
> ...
>
> 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