From Eclipse
Java, I run a PHP script which has an embedded call to a cloud mySQL stored procedure.
mySQL Workbench can store and display Chinese characters correctly.
Eclipse returns the dataset correctly in English, but Chinese characters (and a Greek name) cannot be displayed properly.
This is what I 've tried so far:
(1) In mySQL, I created the table wikth this specification:
ENGINE=INNODB AUTO_INCREMENT= 2468 CHARACTER SET
utf8 COLLATE utf8_general_ci;
(2) In the PHP script, I specified the header like this:
header("Content-type:application/json; c
harset=utf-8");
(3) The response is json_encoded, like this:
echo json_encode(array("db_response"=>$response));
(4) And in eclipse, I've set thre preference to utf-8, like this:
Window -> Preferences -> General -> Workspace -> title file encoding
Other UTF-8
Chinese characters are displayed like this:
???(??)???
Do I have to download some font or char-set for the project library?
Additonal info re my environment
I am using Eclipse Oxygen.3a Release (4.7.3a
java -version -> 1.8.0_171
javac -version -> 1.8.0_144
I have loaded java-json.jar and mysql-connector-java-5.1.26.jar into my Referenced Libraries