Mysql : invisible characters
To simplify, I save a JSON in my Mysql database, the JSON has this form:
{
"idAd": "",
"titleAd": "F2 47m² 1340 CC",
"dateAd": "2017-11-26",
"priseAd": 1340,
}
The field "titleAd" can contain special characters, including some weird and invisible characters :p So when I make an extraction of this field the invisible character turns into "?" I know it's a basic and simple encoding problem but I can't find the solution.
{
"idAd": "",
"titleAd": "F2 47m² 1340? CC",
"dateAd": "2017-11-26",
"priseAd": 1340,
}
For information I have specified the type of encoding in connection to the database
const mysql = require('mysql');
const db = mysql.createConnection({
host: 'localhost',
user: 'root',
database: 'dababase',
charset: "utf8_general_ci"
});
Thanks for your help.
链接地址: http://www.djcxy.com/p/60838.html上一篇: 如何在Python上使用“pip”安装psycopg2?
下一篇: Mysql:隐形字符