我无法使用此代码打印sinhala单词。这里FullName
是一个僧伽罗语。我使用MS SQL Server 2008.我可以得到正确的结果,但我不能回应我从SQL查询得到的sinhala单词。
function FindName($serverName,$uid,$pwd,$databaseName,$conn){
$tsql = "SELECT FullName ,NameDenotedByInitials,SerialNo,PDID,GNDID,VSID FROM dbo.Voter WHERE National_ID_Number = '28105000V'" ;
$stmt = sqlsrv_query( $conn,$tsql);
if ( $stmt ) { // echo "Statement executed.<br>\n";
}
else {
echo "Error in statement execution.\n";
die( print_r( sqlsrv_errors(), true)); }
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC)) {
$this-> NameS = $row['FullName'];
$this-> NameT = $row['NameDenotedByInitials'];
$this-> Sirial = $row['SerialNo'];
$this-> PDID = $row['PDID'];
$this-> GNDID = $row['GNDID'];
$this-> VSID = $row['VSID'];}
echo $this-> NameS;
}