<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 14/09/2015 3:56 am, Kadir Beyazlı wrote:<br>
<blockquote
cite="mid:CACRdqbWaBO2aJs2GVSnwvLirD+vJoYxdbw-XjsDtP-SjfBS0Ag@mail.gmail.com"
type="cite">
<pre wrap="">Now my only problem is encoding JSON data.
My data is Turkish, I was setting charset as follow to display correcty
print $q->header(-content_type => "application/json; charset='utf8');
How will I do it at Dancer2?
</pre>
</blockquote>
<br>
Hey Kadir.<br>
<br>
You do no need to specify your JSON content as being UTF-8.<br>
<br>
RFC4627
<meta charset="utf-8">
states:<br>
"JSON text SHALL be encoded in Unicode. The default encoding is
UTF-8"<br>
and goes on to explain how to determine the encoding of the octet
stream.<br>
<br>
Furthermore, the IANA assignment for 'application/json' includes the
following note:<br>
"No "charset" parameter is defined for this registration. Adding one
really has no effect on compliant recipients."<br>
<br>
Hope that helps,<br>
Russell.<br>
<br>
</body>
</html>