I have simple PHP test API for my database. It queries MySQL DB and returns JSON. Problem is, some values are in Cyrillic and all I get is a question marks. My PHP code is like this:
<?php
mysql_connect ( "localhost", "root", "" );
mysql_select_db ( "uni_database" );
$q = mysql_query ( "SELECT * FROM `students`" );
while ( $e = mysql_fetch_assoc ( $q ) )
$output [] = $e;
print (json_encode( $output ) );
mysql_close ();
?>
Does anyone know how to encode values from DB to UTF8?