Re:   to  mystery

William McKee <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
On Wed, Feb 25, 2004 at 02:01:56PM +0000, Chris Croome wrote:
> Mail the script  -- I have a UTF-8 env and would be happy to test it.

It's small so I've attached the script and the template. Let me know if
you have any questions about it. I'd love to know if you see the
character in the second example (there's a &nbsp; char between the words
Sticky and Space).


> I don't have any answer but I know that MKDoc has a bug very much like
> this at the moment:
> 
>   Copyright © 2001-2002 MKDoc Ltd.

I see it as well. In fact, I went back to look at my test site and am
now seeing that character showing up again despite the meta tag. Dunno
why it went away for me yesterday but it's definitely there again
instead of a sticky space.

I even fired up Windows on my laptop to check; it's also showing the
character in both Firefox & IE6. Are you using Petal::Parser::HTB on the
scripts that produce these pages?


> I haven't been able to work out how to reproduce this but lots of pages
> with a (c) symbol in the rights metadata field end up with ©
> _sometimes_ ...

The inconsistency is definitely the most annoying aspect of this whole
problem.


William

-- 
Knowmad Services Inc.
http://www.knowmad.com
petal_test.pl (application/x-perl, 755 B)
#!/usr/bin/perl -w

use Petal;
#use Petal::Parser::HTB;

use constant RUNALLTESTS => 1;

my $taint = 0;
my $template_file = 'petal_test.tmpl';

$ENV{PATH} = "/bin:/usr/bin";

$Petal::DISK_CACHE = 0;
$Petal::MEMORY_CACHE = 0;
$Petal::TAINT = $taint;
$Petal::BASE_DIR = './';
$Petal::INPUT = "XHTML";
#$Petal::INPUT = "XML";
$Petal::OUTPUT = "XHTML";
#$Petal::OUTPUT = "XML";
my $template = new Petal ($template_file);

my $hash = {
	petal => { version => $Petal::VERSION },
	error_message => "Kilroy was Here",
};
my $html = $template->process($hash);
print $html;


print "\n\n";
print "-" x 72;
print "\n\n";

require Petal::Parser::HTB;
$template = new Petal ($template_file);
$hash->{'htb'} = 'true';
my $html = $template->process($hash);
print $html;
petal_test.tmpl (text/plain, 302 B)
<html>
	<head>
		<title petal:if="htb" petal:content="string:Petal Test with Petal::Parser::HTB">Petal Test</title>
		<title petal:if="false: htb">Petal Test</title>
	</head>
	<body>
		<h1>Petal Test - v<span petal:replace="petal/version">0.00</span></h1>

		<p>Sticky&nbsp;Space</p>

	</body>
</html>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.