아래 코드는이 솔루션을 사용하지만 작동하지 않습니다. 또한 나는 힌디어로 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