Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does json support arabic characters?

Tags:

json

ajax

php

i want to ask quick question, is json support arabic characters i mean when i search for something like following

$values = $database->get_by_name('معاً'); 
echo json_encode(array('returnedFromValue' => $value."<br/>"));

also I'm looking for arabic result from the database, the returned values will be like this

{"returnedFromValue":"\u0627\u0644\u0645\u0639\u0627\u062f\u0649<br\/>"}{"returnedFromValue":"\u0627\u0644\u0645\u0639\u0627\u062f\u0649<br\/>"}

what I'm missing here ? is it better to use XML in term of supporting the arabic characters

like image 924
osos Avatar asked Oct 10 '22 22:10

osos


1 Answers

JSON is, just like XML, some kind of data-interchange-format. it's not addicted to a special charset, so arabic characters should be fine if u use a charset that supports these characters (UFT-8 for example).

like image 90
oezi Avatar answered Oct 12 '22 11:10

oezi