tosh has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm looking to find out why Elysées get's converted to Elysées when it's processed by Template Toolkit...

I've already searched the FM for the text "lang" anywhere in the docs and hit Google with all likely combinations of ("template toolkit" unlauts) or ("template toolkit" accents) or ("template toolkit" german) and the best info is here: http://stason.org/talks/singaporelinuxshow2001/html/multiling.html but it's not exactly what I need.

I would assume that my iso-8859-1 characters are being converted to two uh.... other characters (I read about this problem the other day but forget the UTF, UNICODE, ISO.... AAAUUUGGGGHHHH specifics)

I asked the Template Toolkit mailing list but the only suggestion I received was that perhaps an XML parser was doing funny things.

It's not.

At first I thought was a possibility, so I tried again without even a *hint* of any XML or their parsers, and still the problem persisted.
>From the debugger: DB<3> print $outputOBJ->{userOBJ}->{_DATA}->{first_name} Elysées DB<3>
So the data is stored fine, but as I hit the parser in the next step of code:
return $pageOBJ->process($page, {output => $outputOBJ, message => \$message, step => $in->param('step')});
Elysées still gets turned into Elysées...

I'm sure I'm not the first person to use Template Toolkit with other languages...

THANKS!!

Tosh

Replies are listed 'Best First'.
Re: Template Toolkit and non-english characters
by epoptai (Curate) on Jul 17, 2002 at 02:24 UTC
      There is no XML and no XML parsing going on in this script.

      This is only about Template Toolkit, not XML.

      No ideas? Anyone?

      Tosh