私のコードの下で私はこの解決策を試してみましたが、うまくいきません。また、ヒンディー語の場合はutf8_unicode_ci、データベース照合の場合はutf8_bin(グジャラート語)を提供します。MySQLのヒンディー語とグジャラト語でデータを取り込む方法は?
データを取得する方法を教えてください。ヒンディー語&グジャラト語。
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?php
session_start();
require_once('config.php');
$JSONoutput = array();
$q=mysqli_query($con,"SELECT * FROM tbl_Hindi");
header('Content-Type: text/html; charset=UTF-8');
while($rs=mysqli_fetch_assoc($q))
{
$JSONoutput['SMS'][] = array("ID"=>$rs['ID'],"Message"=>$rs['Message']);
}
print(json_encode($JSONoutput));
?>
出力:
{"SMS":[{"ID":"1","Message":"?? ????? ?? ??? ???? ??, ???? ?? ???? ??? ?? ????? ?? ?? ???? ?? ??????"},{"ID":"2","Message":"???? ????? : ??? ???? ?? ? ????? ????? : shopping ???? ?? ??? ???? ????? : : ???? ?? ???? ? ????? ????? : ???? ??? ??? ?? Gf ?? ? ???? ????? : ?? ?? ??? ??? ?? ? ????? ????? : ?? ???? "}]}
私もこのソリューションを試してみますが、私の質問よりもうまく機能しません。 –
このURLは、このステップに関係していることを願っています:http://stackoverflow.com/questions/12435867/how-to-store-the-data -in-unicode-in-hindi-language – Senthil
このURLが役立つことを願っています:http://stackoverflow.com/questions/12435867/how-to-store-the-data-in-unicode-in-hindi -language – Senthil