Sunday, February 19, 2012

Different collations on a single server

I have 2 sql server databases on a single server and each database working with a web site written with VBScript. One database with a collation of SQL_Latin1_General_CP1254_CI_AS and another databse with a collation of SQL_Latin1_General_CP850_CI_AS. Because of the server's windows character setting which is set to "English" the web site working with "CP850" displays NVARCHAR characters correctly, but the web site with "CP1254" displays some of the special turkish NVARCHAR characters not correctly. How can I solve this problem? Note : Query Analyzer displays the characters correctly on the database with a collation of "1254"Did you set Session.CodePage or the CodePage server-side directive to
tell IIS to encode outgoing strings as Unicode, and set the META CHARSET
property to tell the client browser to decode the page as Unicode?
Here's some simple ASP code that demonstrates how to round-trip Unicode
data from arbitrary languages from web browser->IIS->ASP->SQL and back
out to the browser:
http://groups.google.com/groups?q=bartd+asp&hl=en&lr=&ie=UTF-8&selm=JrIV8D
ZDDHA.2496%40cpmsftngxa06.phx.gbl&rnum=1
If this line wraps, try this shorter URL:
http://tinyurl.com/2zygn
Try this out -- it should work if you're using IIS 5 (Windows 2000) or
later. The only thing you should need to change is the connection string
(strCnn) in SQLNLS_UTF8.ASP to point to your SQL Server and provide a
valid login/password.
HTH,
Bart
--
Bart Duncan
Microsoft SQL Server Support
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Thread-Topic: Different collations on a single server
thread-index: AcPww2+N7ky8j5FoSwCPaUe5Q6LzGg==X-Tomcat-NG: microsoft.public.sqlserver.server
From: "=?Utf-8?B?bWFocnV0aQ==?=" <anonymous@.discussions.microsoft.com>
Subject: Different collations on a single server
Date: Wed, 11 Feb 2004 09:21:07 -0800
Lines: 1
Message-ID: <FCBF0A2A-02A5-447E-890F-5DD52D4A550D@.microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.sqlserver.server
Path: cpmsftngxa07.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.sqlserver.server:328749
NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
X-Tomcat-NG: microsoft.public.sqlserver.server
I have 2 sql server databases on a single server and each database
working with a web site written with VBScript. One database with a
collation of SQL_Latin1_General_CP1254_CI_AS and another databse with a
collation of SQL_Latin1_General_CP850_CI_AS. Because of the server's
windows character setting which is set to "English" the web site working
with "CP850" displays NVARCHAR characters correctly, but the web site
with "CP1254" displays some of the special turkish NVARCHAR characters
not correctly. How can I solve this problem? Note : Query Analyzer
displays the characters correctly on the database with a collation of
"1254"

No comments:

Post a Comment