Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 nvarchar in update and insert
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

dirkpauw
Starting Member

Belgium
4 Posts

Posted - 14 September 2006 :  03:37:20  Show Profile
Looks like nobody runs unicaode versions in SQLserver?
THe Forum code lacks the N'' prefix for inserts and updates.
Without, all special chars are lost ...

Didn't find other refs to the problem, strange ...

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 September 2006 :  03:55:40  Show Profile  Visit HuwR's Homepage
it has never cropped up before because the forum is primarily designed to support english and therefore does not require unicode strings
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 September 2006 :  04:44:41  Show Profile  Send ruirib a Yahoo! Message
What are you talking about? There are several nvarchar and ntext fields, for the fields that matter (T_SUBJECT and T_MESSAGE, for example). The forum will support unicode right out of the box.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 September 2006 :  08:24:36  Show Profile  Visit HuwR's Homepage
to insert unicode into a sqlserver db you have to prefix the string with N ie
INSERT INTO FORUM_REPLY (R_MESSAGE) values (N'some unicode characters here') and that is not done by the forum
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 September 2006 :  08:44:51  Show Profile  Send ruirib a Yahoo! Message
Huw,

If you set the LCID and / or the session codepage and charset, unicode can be inserted by the user and it will be inserted in the DB without any issues whatsoever.

Our forum has been used in different languages, highly dependent on unicode storage, like chinese, japanese, turkish, and many more (portuguese as well).


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 September 2006 :  08:55:43  Show Profile  Visit HuwR's Homepage
yes I agree rui, but without using the N'string' notation you are limited to a specific characterset at a time, the correct way to insert literal strings into a database is by using the unicode notation. and besides, I'm not sure why dirkpauw asked the question, since being belgian should require unicode as European languages are supported by the standard character set
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 September 2006 :  09:06:16  Show Profile  Send ruirib a Yahoo! Message
Well Huw, you can always use codepage 65001 and utf-8 as the charset, and you can support every single char you need. I do understand the issue though, even if, as you correctly put it, I haven't seen this as being a problem at all, in all my years at Snitz.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 September 2006 :  09:15:56  Show Profile  Visit HuwR's Homepage
quote:
use codepage 65001 and utf-8
yes that is true.
quote:
I haven't seen this as being a problem at all, in all my years at Snitz
nope neither have I
Go to Top of Page

twin
New Member

78 Posts

Posted - 13 March 2007 :  05:17:47  Show Profile
We have updated our SQL-Server from 7.0 to 2004 and now we have problems with these characters (i.e. german ö ä ü).
When i look in the database directly the characters are correct, so what can be the problem ?

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 March 2007 :  05:24:28  Show Profile  Send ruirib a Yahoo! Message
I really don't know much SQL Server 7.0. Maybe your SQL Server is running in an OS not in the german language... I don't think chaging the LCID to a german LCID will help, but you can try it. Other than that, following the advice in this thread should do it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

twin
New Member

78 Posts

Posted - 13 March 2007 :  05:39:29  Show Profile
SQLserver is running in german also.
Itried to change the LCID.SESSION from 1033 to 1031 but that didn't work.
So, where can i change the charset and session codepage ?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 March 2007 :  05:44:18  Show Profile  Send ruirib a Yahoo! Message
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=62503&SearchTerms=charset,65001


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

twin
New Member

78 Posts

Posted - 13 March 2007 :  06:17:04  Show Profile
i can set Response.CharSet = "utf-8" but
Response.CodePage = 65001 does not work. Codepage is not defined ?

Go to Top of Page

twin
New Member

78 Posts

Posted - 13 March 2007 :  06:32:08  Show Profile
and were do i have to change the HTML characterset to UTF-8 ?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 March 2007 :  06:49:30  Show Profile  Send ruirib a Yahoo! Message
Maybe the server does not support that codepage... I suppose the answer to your last question is that you need to save the .asp files themselves in UTF-8 format.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

twin
New Member

78 Posts

Posted - 13 March 2007 :  07:02:40  Show Profile
ok thank you !
I tried to save one of the asp-file into unicode format. But the IIS does not support this format and therefore maybe not the CodePage property.
I think the combination of SQLServer2005 and IIS5.0 is not the best. Probably i have to update our IIS.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07