Insert Chinese Characters in Oracle.

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 ?

any hints ?

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.

Hi tongwang,

Thanx for the quite note.

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.

Even dynamic SQL is not working with Oracle database.

I am able to insert the same record in SQL server 2005, but does not when insert in Oracle. I wonder if its an issue with oracle JDBC driver !.

How do i know what i am getting ? Is there way to get encoding type based on the incoming data.


If you can use java, try :
it has getEncoding() method. but i’m not sure if it aways giving you the right value.

If you are dealing xml, xml tag should have encoding, use that.

If SQL server works, that may indicat your encoding setting in Oracle is not right