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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -