sql server - nvarchar datatype displays question marks in php echo -


i using sqlsrv_* mssql drivers php connect sql server database , reading nvarchar field named uniname1 table holds indian regional language characters. until try print nvarchar field in php associative array , displays ????????? (question marks).

please see code below

    $result = sqlsrv_query($conn,$sql);     $row = sqlsrv_fetch_array($result,sqlsrv_fetch_assoc);     print_r(($row['uniname1'])); exit; 

i using php version 5.4.16. , sql server2008. have tried using meta tags utf8, mb encoding, everything, nothing helped.

please me display regional language on web screen database

not problem of sql server if can see correct characters in database. reconfigure web server support utf-8 encoding.

assuming have apache web server , php, need to:

apache

  • browse httpd.conf file find adddefaultcharset. if exists, change value utf-8

php

  • browse php.ini file find default_charset. change utf-8

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -