Monday, March 19, 2012

Ascii 582

Is there any possibility to set up srv collation in 852 manner (SQL 2000) ?
thx in advance pxal.SQLSERVER2K supports these code pages:
1258,1257,1256,1255,1254,1253,1252,1251,1250,950,9 49,936,932,874,850,437

Central European Windows - CP 1250
Central European DOS - Latin 2 (CP 852)

So CP 852 is not supported and advanced CP - COLLATIONS are used.

For example, for Czech language (Central European) use collations:
/* SQL collations */
SQL_Czech_CP1250_CI_AS
SQL_Czech_CP1250_CS_AS
/* Widows collations */
Czech_CS_AS
Czech_CS_AI
Czech_CI_AS
Czech_CI_AI
Czech_BIN
Suffixes _CS,_CI,_AS,_AI specify Case and Accent sensitivity.
You also can add suffixes _KS,_KI,_WS,_WI (Kana and Width sensitivity), but they are not used.
With suffix _BIN raw binary data are used, fast, but dangerous.

Then binary stored:
CP1250 (1 B) when char /varchar /text datatype is used
UNICODE (2 B) when nchar/nvarchar/ntext datatype is used

Collation affectes comparing (linking) and sorting data (grouping,indexes).
Use COLLATE translating option to change behavior of query.
select 'abcd' COLLATE Czech_CS_AS

See BOL for more.|||0. ACP on srv win2k:1250, OEMCP: 852 (clients: the same)
1. I'm runnig Polish_CI_AS on sql 2k (it ansi)
2. I have application via ODBC (so it is ANSI app) -> Latin 2 (1250) (more, internally it converts ascii (oem 852) to ansi 1250 before sending into srv via odbc)
1+2-> no translation AutoAnsiToOem is needed (if apply nothing should heppens: ansi to ansi)
3. finally there is 3rd party soft (MS Access) also via odbc -> also ansi, connected to to the same db.

so ascii codes runs like follows:
main app: sends ascii[168] (after internal converting into 1250 ascii[191]) - no translation of ascii[191]- srv stores ascii[191]
connecting with access: I see ascii[191]

the problem is I'm runnig all of them as ansii clients and server: so there is no translation; but main app used to translate from ansii 2 ascii herself.
so I thoght to install sql srv as oem in native mine cp 852 to force DB-Function: AutoAnsiToOem.

translating storage into unicode is not possible: more than 300 tbl's in dbd and app doesn't like it
thx in advance, pawel|||Try adding replace of ascii[191] by ascii[168] in trigger or application before insert/update.
What about "Perform translation for character data" check box in ODBC?

P.S. If your are completly rewritting your starting post, are you able to change its subject from ASCII 582 to ASCII 852?|||Try adding replace of ascii[191] by ascii[168] in trigger or application before insert/update.
>> it is not possible, I have no influence what app sends. I put that trig in SQL srv and I will work with "backup" table with required dataset format,.
I wanted to find "native" solution for sql srv but probably I failed.

What about "Perform translation for character data" check box in ODBC?
>> do not work
I heard about translation tables for cp's in Fox Pro ans Sybase ODBC connectors but I cannot find them.

P.S. If your are completly rewritting your starting post, are you able to change its subject from ASCII 582 to ASCII 852?
>> :) pardon I was sleepy and tired

thx anyway, Pawel

No comments:

Post a Comment