[Templates] Textile filter and utf-8

[prev] [thread] [next] [Date index for 2005/05/22]

From: Birgit Kellner
Subject: [Templates] Textile filter and utf-8
Date: 16:51 on 22 May 2005
Hello,

I am trying to use the textile filter with Template Toolkit, but the 
character set gets messed up.

I'm not sure whether I'm using the right code, so here's what I have 
done so far:

- installed the latest versions of Text::Textile and 
Template::Plugin::Textile
- use Text::Textile at the beginning of the perl script
- <% use Textile %> at the beginning of the template, and wrap the 
textile'd text in <% filter textile %>

The filter works fine, only the character set is a problem: while the 
text is encoded in utf-8, it gets displayed as plain ascii (i.e. German 
umlauts and other diacritical characters get messed up).

When I print the same text in the template, without the textile filter, 
all characters get displayed correctly.

Alternatively, when textile processes the text in the perl script, 
invoked with:

$text = Text::Textile->new;
$text->charset('utf-8');
$tect->process($text_to_process);

- everything is fine, too, so I suspect there is some error in the way 
the textile filter handles character sets in my setup.

I'd appreciate any help on this,

best regards,

Birgit Kellner





_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Textile filter and utf-8
Birgit Kellner 16:51 on 22 May 2005

Generated at 15:56 on 25 May 2005 by mariachi v0.52