2015-09-14 15:44 GMT+03:00 Kadir Beyazlı <[email protected]>:

> [KB] I checked, it is UTF-8. But my Turkish characters are still
> broken. My country's character set is iso-8859-9 but UTF8 was always
> enough to display correct data.
> I will search about it.

Actually, right way to emit JSON is to use serializer, so the right
way is something like that:

=======
use Dancer2;
set serializer => 'JSON';

get '/json' => sub {
  my $ref = {
    BranchID => 'ülane kõnnib öösiti õues',
    Branch   => 'šaakal kasutab ainult žiletti',
  };
  return  $ref;
};

start;
=======

If you don't use serializer, you have wrong content-type. If you set
content-type by hand, you have wrong content-lenght, etc

Wbr,
-- 
Kõike hääd,

Gunnar
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to