[Petal] to  mystery
William McKee
william at knowmad.com
Mon Jan 19 13:22:23 GMT 2004
On Sun, Jan 18, 2004 at 05:25:26PM +0000, Jean-Michel Hiver wrote:
> Petal now always encode the resulting output as UTF-8, unless you are
> using perl 5.6.1 in which case it doesn't care about Unicode stuff.
>
> That's the only way I could sort of get it to work properly with
> includes and with perls < 5.7.
Hmm, I guess I need to reread the docs again. At any rate, you are still
outputting the octal \240 code for a non-breaking space which is an
iso8859 character (dec 160). The acircumflex (finally looked up that
character) which is being output on my pages that utilize
Petal::Parser::HTB has the following characteristics in UTF8[1]:
 229 E5 00C2 194 195.130 C382 \x{221A}Ç LATIN CAPITAL LETTER A WITH CIRCUMFLEX Acircumflex
However, I'm not seeing anywhere in HTB that you are defining entities
so am boggled as to why using this module changes the output in the
tests I wrote (to recap, I only get the Acircumflex output when using
P::P::HTB). It acts like it is changing the 160 to a 229. Is there
something inherent in P::P::HTB that would do this kind of character
conversion? Hopefully it has something to do with locale.
Also, I tried Mark's suggestion of adding the following meta-tag to my
templates:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Unfortunately, this did not change things when I view my templates
through a browser. Very strange! Even weirder is that some pages do not
show this problem at all even though there are entities. They are
being removed without being replaced by an Acircumflex. I can always get
it to show up on the command-line however and on those pages which show
it, the Acircumflex appears in the source. And yes, both pages are being
processed with P::P::HTB.
> Petal will not look at your locale settings but Perl almost always
> does... unfortunately locales aren't one of my specialities so I can't
> tell you much more :(
Well this is helpful. Perhaps some other folks on the list can fill in
the gaps in our knowledge :).
Later,
William
[1] http://www1.tip.nl/~t876506/utf8tbl.html
--
Knowmad Services Inc.
http://www.knowmad.com
More information about the Petal
mailing list