These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: nHibernate and nvarchar (unicode characters)
PostPosted: Sun Oct 11, 2009 4:28 am 
Newbie

Joined: Mon Oct 05, 2009 5:06 am
Posts: 6
Hi..

I can't seem to get the correct characters into my database.

My classes have type String, and in the mapping I specify type AnsiString.

The database fields are of type nvarchar.

And when I use SQL Server Management Studio to insert a row using:

------------------
create table test
(
test nvarchar(max)
)

insert into test values (N'Fryslân')

select * from test
------------------

It displays:

test
-----------
Fryslân

(1 row(s) affected)


But when I use nHibernate to do the same using Session.SaveOrUpdate(doTest)

It will eventually show:

Frysl?n

Am I missing something?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.