Skip to content

to_json is double encoding UTF8? #686

@ambs

Description

@ambs

try:

package foo;
use Dancer2;
use utf8;

get '/' => sub {
    return to_json({foo => "Simões"});
};
1;

vs

package foo;
use Dancer2;
use utf8;

get '/' => sub {
    return to_json({foo => "Simões"}, { utf8 => 0} );
};
1;

The second works :-|

When fixing this, take care not to break the automatic serializer.
Also, I think this is a regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions