Hi,

I've encountered the same problem when I initially started to use Sablotron.
The work-around I used was a bit different. Instead of using the
charset=UTF-8, I put into my XSLT stylesheet the following line:

        <xsl:output media-type="text/html" encoding="iso-8859-1"/>

This corrects the issue with '�' characters appearing in place of the
none-breaking space.

FYI: using Perl version 5.005_03, and Sablotron 0.42 with XML-Sablotron Perl
module.

<name>Christopher Rivera</name>
<email href="[EMAIL PROTECTED]"/>
<email href="[EMAIL PROTECTED]"/>
<position>Webmaster</position>
<company url="http://www.onenest.com/">oneNest.com, Inc.</company>

-----------------------------------------------------------------------
Hi,

thanks a lot for this hint! I would like to add, that I use Sablotron
in Perl 5.005 CGI and changing the following has done the trick for me:

Old:
print <<"EOF";
Content-type: text/html

New:
print <<"EOF";
Content-type: text/html; charset=UTF-8

Friedrich

----- Forwarded message from Petr Cimprich <[EMAIL PROTECTED]> -----

Date: Wed, 16 Aug 2000 14:27:27 +0200
From: Petr Cimprich <[EMAIL PROTECTED]>
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
To: Sablotron Mailing List <[EMAIL PROTECTED]>
Subject: Re: [Sab] nbsp problem

Mat,

If you try to display a utf-8 file using iso-8859-1 or win-1252 code page, �
is displayed instead of space. I guess this is the reason of your problem.
To be sure, include
<META http-equiv="Content-Type"  content="text/html; charset=UTF-8"> to your
HTML. You can either be happy with utf-8 (and include META to all your
file), or to try recode the output.

Sablot manual says the following on output encoding:

The output is in UTF-8 by default. If the iconv library is present on the
system (it seems to be a standard part of glibc2, and a Win32 implementation
is available), then any of the above encoding can be specified for output,
using the 'encoding' attribute of xsl:output. Note that this new feature [by
Sven Neumann] still needs testing.

Petr



Mat Jones wrote:

> Hi
>
> I'm trying to ouput a &#160; (non breaking space) entity from an XSLT
> transformation.  My stylesheet is set to use the 'html' output method.
> For some reason the entity is not being output, I'm getting an �
> character instead.  Am I missing something?  Do I need to use
> <xsl:entity_ref name="nbsp"/> instead?
>
> I will also need to process XML files that contain &#160; entities and
> pass them through to the output.
>
> Thanks for any help
>
> --
> | Mat Jones                       Fixed cost Internet access available @
> | Application Developer                              http://www.plus.net
> | PlusNet Technologies Ltd
> +---------------"PlusNet  - The smarter way to Internet"----------------

--
Petr Cimprich
Ginger Alliance Ltd.
www.gingerall.com


Reply via email to