Hi.
I am trying to insert Arabic text to mysql database, but it does not work properly.
I can see only "?????" in the database.
Please help and thanks.
Problem with inserting Arabic text to the database
Re: Problem with inserting Arabic text to the database
Hi,
I am not a MySQL expert but I believe you should look into the "collation" property of your database schema.
See this article:
https://stackoverflow.com/questions/685 ... l-database
Cheers
I am not a MySQL expert but I believe you should look into the "collation" property of your database schema.
See this article:
https://stackoverflow.com/questions/685 ... l-database
Cheers
Re: Problem with inserting Arabic text to the database
It works properly on local server, but does not work on AWS server.
Smart Fox Server settings and MySQL settings are exactly the same.
Result on Smart Fox Console:
But looks "?????" in the database.(works correctly "العربية" on local server.)
Smart Fox Server settings and MySQL settings are exactly the same.
Code: Select all
String sql = "UPDATE user SET name='العربية' WHERE id=5";
System.out.println(sql);
try {
dbManager.executeUpdate(sql, new Object[] {});
} catch (SQLException e) {
trace(ExtensionLogLevel.WARN, "SQL Failed: " + e.toString());
}
Result on Smart Fox Console:
Code: Select all
UPDATE user SET name='العربية' WHERE id=5
But looks "?????" in the database.(works correctly "العربية" on local server.)
Re: Problem with inserting Arabic text to the database
Code: Select all
jdbc:mysql://127.0.0.1:3306/mydb?useUnicode=yes&characterEncoding=UTF-8
This just fixed the issue.
Thanks for your help.
Re: Problem with inserting Arabic text to the database
The fix suggests that the two mysql servers are not configured exactly the same. I'd recommend comparing the environment variables of both servers if you want to get to the bottom of it, though you've already found a solution
Cheers
Cheers
Who is online
Users browsing this forum: No registered users and 67 guests