The euro symbol is defined in code page ISO-8859-15 - I'm not very familiar with Oracle, but it would seem that the Oracle client driver (from Oracle) doesn't use ISO-8859-15 or doesn't agree with the server what encoding to use.
NHibernate sends .Net strings (internally encoded as UTF-16 I believe) to the Oracle driver and it's up to the driver to send them correctly to and from the server. Maybe this is something you can configure in the connection string? /Oskar 2017-12-07 16:32 GMT+00:00 Felipe Oriani <[email protected]>: > @Fran, > > Yes, we think about it, to persist some code and convert it on our code to > show on the UI layer but it is our last option. I would like to know if > there is a way to persist it on oracle using nhibernate, because if we run > a insert sql statement directly on the database (pl/sql), it saves fine. > > Thank you. > > On Thu, Dec 7, 2017 at 2:14 PM, Fran Knebels <[email protected]> wrote: > >> Aren't those symbols Unicode? You would need to store them in an >> nvarchar column. >> >> Conversely , you could store the html value in the column which would be >> ASCII >> >> On Dec 7, 2017 11:09 AM, "Felipe Oriani" <[email protected]> wrote: >> >> Hi, >> >> We have a database which we store the currencies of the world. We have a >> column called Symbol which the datatype is VARCHAR(20). It is a Oracle >> database and we are mapping in a string property with Fluent NHibernate >> like this: >> >> Map(x => x.Symbol).Not.Nullable(); >> >> In this column we store the symbol for the currency. For sample: U$ >> (dolar), £ (pounds), R$ (real - brazil), € (euro). >> >> The problem is with the € symbol for Euro Currency, when we try it, >> nhibernate save on the database the ¿ char, instead of €. We have tried to >> map the column using AnsiString, for sample: >> >> Map(x => x.Symbol).CustomType("AnsiString").Not.Nullable(); >> >> but it does not work as expected. >> >> If we hit a insert sql statement on the database it works as expected but >> nhibernate cannot read it and give the ¿ char. >> >> How can we solve it? >> >> Thank you. >> >> >> >> -- >> ______________________________________ >> Felipe B Oriani >> [email protected] >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > ______________________________________ > Felipe B Oriani > [email protected] > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/nhusers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
