473,426 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

characters encoding

Hello,

in what code-page are characters stored in MSSQL tables?
is it windows1250?

--
Chris
Jul 23 '05 #1
2 21462
You can determine the instance default collation with SERVERPROPERTY:

SELECT SERVERPROPERTY('Collation')

Collation can be specified at the column, database or instance level. If
not specified when the column is created, the database default collation is
used. If no database collation is specified, then the instance collation is
used.

It is best to use the default instance collation unless you have a specific
reason to do otherwise.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Krzysiek" <st************@nospam.o2.pl> wrote in message
news:cu**********@news.onet.pl...
Hello,

in what code-page are characters stored in MSSQL tables?
is it windows1250?

--
Chris

Jul 23 '05 #2
Krzysiek (st************@nospam.o2.pl) writes:
in what code-page are characters stored in MSSQL tables?
is it windows1250?


Text data can be stored in two ways in SQL Server: nchar/nvarchar/ntext
which is Unicode, and char/varchar/text which is some 8-bit encoding.

With Unicode datatypes you don't have to bother all characters are there.

With 8-bit datatypes they will be in some code page. And, yes, in your
case this could well be 1250, since this is the code page normally used
for Polish.

SQL Server have a concept of collations, and as Dan said there is a default
collation on server level, and there is also a default on database level.
But the actual collation can vary from column to column.

As Dan said, to get the default server collation, you can say:

SELECT SERVERPROPERTY('Collation')

To get the default collation for a database, you can do:

select databasepropertyex(db_name(), 'Collation')

And to see the collations for the columns in a table, use sp_help.

Once you have the collation, you can say:

select collationproperty('Collationname', 'CodePage')

to find the code page.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Pikkel | last post by:
i'm looking for a way to replace special characters with characters without accents, cedilles, etc.
2
by: lkrubner | last post by:
What I need to do is find out what characters in a string are not supported by the UTF-8 encoding. The problem arises when someone logs in and uses my php script to create a weblog post. They are...
9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
43
by: Vladimir | last post by:
Method UnicodeEncoding.GetMaxByteCount(charCount) returns charCount * 2. Method UTF8Encoding.GetMaxByteCount(charCount) returns charCount * 4. But why that? Look: /* Each Unicode character...
13
by: Xah Lee | last post by:
the Journey of Foreign Characters thru Internet Xah Lee, 20051101 There's a bunch of confusions about the display of non-ascii characters such as the bullet "•". These confusions are...
3
by: JSM | last post by:
Hi, I am just trying to port an existing simple encryption routine to C#. this routine simply adds/substracts 10 ascii characters to each character in a text file (except quotes). The routine...
2
by: Ross Noe via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Ross Noe I created an XML file using ASP that has Russian characters. Forsome reason ASP.Net doesn't read the Russian...
20
by: SMG | last post by:
Hi All, I have created an application which is working fine and is in about to launch, now suddenly my mgmt says there are chances that Scrip ID( a particular id and not prim key) may have special...
5
by: Timothy Madden | last post by:
Hello Is there a function that will allow me to output text written in utf-8 (from db for example) if my document has Content-Type: text/html; charset=ISO-8859-1 I mean htmlspecialchars()...
13
by: Liang Chen | last post by:
Hope you all had a nice weekend. I have a question that I hope someone can help me out. I want to run a Python program that uses Tkinter for the user interface (GUI). The program allows me to type...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.