I have created web-service to get data from database which is in Gujarati(other language).
While i am accessing that URL of web-service in browser i am getting "????????????" instead of real data.
Please help me to get out of it.
Thanks
I have created web-service to get data from database which is in Gujarati(other language).
While i am accessing that URL of web-service in browser i am getting "????????????" instead of real data.
Please help me to get out of it.
Thanks
 
    
    you have to set encoding
ini_set('default_charset', 'utf-8');
on your webservice php file.
 
    
    Rahul bhai, try to run this script first:
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "test");
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
/* change character set to utf8 */
if (!$mysqli->set_charset("utf8")) {
    printf("Error loading character set utf8: %s\n", $mysqli->error);
} else {
    printf("Current character set: %s\n", $mysqli->character_set_name());
}
$mysqli->close();
?
If you can modify the web-service, try to set charset to utf-8 as shown above, or browse stackoverflow for similar questions, where users ask to set charset etc
