my $amt = "Fünf €"; my $r = {amt => $amt}; use bytes; print JSON::to_json($r), "\n", $amt; {"amt":"Fünf €"} Fünf €