How to print unicode string in PHP

Posted by Pentium10 on Stack Overflow See other posts from Stack Overflow or by Pentium10
Published on 2010-04-29T04:10:35Z Indexed on 2010/04/29 4:17 UTC
Read the original article Hit count: 278

Filed under:

I have this small script:

<?
header('Content-Type: text/javascript; charset=utf8');
$s="L\u00e1szl\u00f3 M\u00e1rton";
echo $s;
?>

The browser displays "L\u00e1szl\u00f3 M\u00e1rton"

and it should display László Márton.

What I am doing wrong?

© Stack Overflow or respective owner

Related posts about php