[Dancer-users] a few unresolved issues

sawyer x xsawyerx at gmail.com
Sat Oct 2 12:20:37 CEST 2010


On Sat, Oct 2, 2010 at 12:11 PM, Alexis Sukrieh <sukria at sukria.net> wrote:

> subject: croaks on utf-8
>> sent: Wed Sep 22 13:28:39 CEST 2010
>> link:
>> http://www.backup-manager.org/pipermail/dancer-users/2010-September/000353.html
>>
>
>
> This issue should be already fixed in our master branch, so please, pull
> the master branch and tell us if that fixes the issue (all you have to do is
> to set charset to "utf8" and all the outgoing content will be encoded
> appropriately).


While this works, I found that I should still use "Encode" to decode any
strings I have which are in a different language. This is exactly what
Template Toolkit does when you add "ENCODING => 'UTF-8'".

use Encode 'decode';
my $decoded = decode( 'UTF-8', $string );

The requirement to decode to UTF-8 manually might be fixed internally in
Dancer, but I *think* that hasn't been decided yet. However, don't take my
word for it. See what works for you.

S.

P.S.:
Either way, that would be pretty difficult to do since some template engines
let you get past a lot of abstraction so you can send a resultset and from
the methods and attributes get the data. If our template engines supported
value-only input, that would be easier to do. But what's the fun in that? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20101002/daa1b7a6/attachment.htm>


More information about the Dancer-users mailing list