Hi I am trying to insert chinese characters in database. When i select those fields with chinese characters, it shows me ‘???’. Any idea how to get chinese characters inserted ?
Database is already UTF-8 encoding and can accept chinese characters from other applications.
When I trace the flow in wM developer i can see whose characters as boxes which mean they are OK.
Do I have to set encoding anywhr or is taken care by database driver ?
Are you using JDBCAdapter to access the DB?
What’s the JDBC Type and output Type you used for those fields when selecting?
Varchar & String type should work if the DB column type is properly defined.
If not, try to select as binary and convert using BinaryToString with UTF-8.
Double check with the installation guide (search unicode) to make sure the DB side is correct.
The problem is not with selecting chinese characters. Its when inserting chinese characters. The database encoding is already unicode as it has many records having chinese characters.
Also i found something weird that my operation with chinese characters works whn I use dynamic JDBC Adapter SQL template, but doesn’t when using insert adapter template.
I guess you need to make sure what you are inserting is UTF-8.
Other encoding is commonly used for encoding Chinese characters (GB2312 or big5 etc.), so you need to verify what you are getting, if needed create some java code to convert. If you directly insert GB2312 encoded chinese into a UTF-8 table, i bet it won’t work.
Hope this helps.