How to configure fluent nhibernate unicode support ? #506
-
I am sending unicode characters (e.g. emoji) from the application to the database but they are "?" seen as. I used the following configuration, but I did not get any results, can anyone who knows about this help?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is very likely a mismatch in encoding anywhere between how the data is input, writen to the database (check the schema encoding there), read again from database, then output in your application. General explanation and guidance on such encoding troubles can be found here, just in case. Check also your Oracle configuration. Oracle Unicode handling may be tricky, depending on how it is configured. So you have to be sure you have set it adequately and use matching string types, types which vary according to the configuration of your server. And also NHibernate Oracle dialect configuration may have to be adjusted depending on how the server is configured. Anyway NHibernate has a few tests for writing non ascii characters, runs them on Oracle, and has no trouble with them. See by example here. If you can provide a failing test in case the trouble is actually on NHibernate side, we could have a look into it. |
Beta Was this translation helpful? Give feedback.
There is very likely a mismatch in encoding anywhere between how the data is input, writen to the database (check the schema encoding there), read again from database, then output in your application.
So it is hard to tell where things are going wrong.
General explanation and guidance on such encoding troubles can be found here, just in case.
Check also your Oracle configuration. Oracle Unicode handling may be tricky, depending on how it is configured. So you have to be sure you have set it adequately and use matching string types, types which vary according to the configuration of your server. And also NHibernate Oracle dialect configuration may have to be adjusted depending on how the s…