I am trying to save chinese character into oracle DB using Nhibernate thru C# and the character saved always end up with some rubbish character.
I have done the following:
I am able to read the chinese character input thru sql developer. But when I try to retrieve them (the character display correctly on screen) and attempt to save them back into the database without any changes, the data saved became " ".
Anyone have any clue what have I miss out here?
I would check what the data really is on the .NET side. Don't trust what's displayed on a console - look at the UTF-16 code points.
See my debugging unicode article for the general approach.
I seem to remember having some problems in Oracle before which were only fixed by setting the database encoding and then rebuilding the database - I couldn't apply it to an existing one. However, the details are in the dim and distant past...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.