I have asp.net 2.0 site and it have uft-8 encoding. When I fill form and save
this to database in nvarchar(50) field (mssql 2000) I see simbols "??????"
if it was some not english text.
Why it happend?
Looks like mssql doent support utf-8. How can I check this?
On Sep 8, 1:44 am, SushiSean <SushiS...@discussions.microsoft.com>
wrote:
> I have asp.net 2.0 site and it have uft-8 encoding. When I fill form and save
> this to database in nvarchar(50) field (mssql 2000) I see simbols "??????"
> if it was some not english text.
> Why it happend?
> Looks like mssql doent support utf-8. How can I check this?
Try to add prefix N in your sql statement
INSERT ... VALUES (N'....', ......
SushiSean - 10 Sep 2007 20:00 GMT
> Try to add prefix N in your sql statement
>
> INSERT ... VALUES (N'....', ......
Wow. Cool, it works. Thanks a lot. But can you told me why?
ON my local pc it works without any N, but when I put this on hosting I need
modify queries to have this N. Why? It is some settings of database?
Alexey Smirnov - 10 Sep 2007 22:01 GMT
On Sep 10, 9:00 pm, SushiSean <SushiS...@discussions.microsoft.com>
wrote:
> > Try to add prefix N in your sql statement
>
[quoted text clipped - 3 lines]
> ON my local pc it works without any N, but when I put this on hosting I need
> modify queries to have this N. Why? It is some settings of database?
It means that server on remote host has different code page and when a
database got a unicode string and save it, any characters in the
unicode string that do not exist in the code page will be lost. When
you use prefix N you tell to database that you send unicode.
"N" stands for National Language in the SQL-92 standard and must be
uppercase