Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 15.03.2004, 18:20   #1
Младенец
 
Join Date: 03 2004
Location: Iran
Age: 34
Posts: 6
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Question Sql Collation Problem

Hi
I am building a site . I need to Save Unicode Armenian Data in Sql . which Collation sould I choose for my Sql DataBase

Thanks In Advance
Reply With Quote
Old 16.03.2004, 17:03   #2
Moderator
 
acid's Avatar
 
Join Date: 09 2001
Location: South Korea, Gumi
Posts: 7,699
Downloads: 102
Uploads: 34
Blog Entries: 16
Reputation: 561 | 6
Default

Quote:
Originally Posted by Masud
Hi
I am building a site . I need to Save Unicode Armenian Data in Sql . which Collation sould I choose for my Sql DataBase

Thanks In Advance
Hi. Do you want to save Unicode Armenian data statically just once or dynamically using some web programming language (php, perl...).
Reply With Quote
Old 18.03.2004, 10:02   #3
Младенец
 
Join Date: 03 2004
Location: Iran
Age: 34
Posts: 6
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by acid
Hi. Do you want to save Unicode Armenian data statically just once or dynamically using some web programming language (php, perl...).
Hi
I'm using asp .net . and I 'm dynamiclly saving data into sql DataBase.
I should use a right Sql Collation to enable my database to save Armenian Unicode
Reply With Quote
Old 18.03.2004, 10:57   #4
cares?..
 
who's Avatar
 
Join Date: 01 2004
Location: RA Army
Age: 47
Posts: 149
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Talking

Quote:
Originally Posted by Masud
Hi
I am building a site . I need to Save Unicode Armenian Data in Sql . which Collation sould I choose for my Sql DataBase
utf8

Reply With Quote
Old 18.03.2004, 16:16   #5
Младенец
 
Join Date: 03 2004
Location: Iran
Age: 34
Posts: 6
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Hi
Come on man ! UTF8 is not a Sql Collation . it is kind of unicode encoding that offcourse support Armenian character . I use UTF8 encoding to save my aspx web pages it allows Armenian Unicode to be written properly in the page but I need an equivalant in Sql . I need to set an Sql Collation Like "SQL_Latin1_General_CP1_CI_AS" that supports Armenian Unicode. (It is not Support Armenian Unicode)
Reply With Quote
Old 18.03.2004, 19:04   #6
cares?..
 
who's Avatar
 
Join Date: 01 2004
Location: RA Army
Age: 47
Posts: 149
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Cool

Quote:
Originally Posted by Masud
Hi
Come on man ! UTF8 is not a Sql Collation . it is kind of unicode encoding that offcourse support Armenian character . I use UTF8 encoding to save my aspx web pages it allows Armenian Unicode to be written properly in the page but I need an equivalant in Sql . I need to set an Sql Collation Like "SQL_Latin1_General_CP1_CI_AS" that supports Armenian Unicode. (It is not Support Armenian Unicode)
Гыгы.. ну и что мы понимаем под "Sql Collation" ?!

Например в MySQL есть charset UTF8 и соответствующий ему collation utf8_general_ci.

http://www.mysql.com/doc/en/Charset-charsets.html

Также есть armscii8. И кстати, мускуль отлично поддерживает все приобразования из юникода в армски и обратно
Reply With Quote
Old 18.03.2004, 19:28   #7
Moderator
 
acid's Avatar
 
Join Date: 09 2001
Location: South Korea, Gumi
Posts: 7,699
Downloads: 102
Uploads: 34
Blog Entries: 16
Reputation: 561 | 6
Default

who
I don't think using russian is appropriate here.
Reply With Quote
Old 18.03.2004, 20:38   #8
cares?..
 
who's Avatar
 
Join Date: 01 2004
Location: RA Army
Age: 47
Posts: 149
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by acid
who
I don't think using russian is appropriate here.
ну если автор топика не понимает по русски, я думаю он нам об этом скажет.

Кроме того, я не владею английским в достаточно свободной форме.
Reply With Quote
Old 18.03.2004, 21:24   #9
Младенец
 
Join Date: 03 2004
Location: Iran
Age: 34
Posts: 6
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by who
Гыгы.. ну и что мы понимаем под "Sql Collation" ?!

Например в MySQL есть charset UTF8 и соответствующий ему collation utf8_general_ci.

http://www.mysql.com/doc/en/Charset-charsets.html

Также есть armscii8. И кстати, мускуль отлично поддерживает все приобразования из юникода в армски и обратно
Thanks a Lot for being such helpful. You know Microsoft Sql Server is somehow diffrent with MySql . I know it sould support Utf8 charset but it does not have a collation name : "utf8_general_ci."
You know the codepage for Armenian Unicode ?
thanks again
Reply With Quote
Old 19.03.2004, 08:01   #10
cares?..
 
who's Avatar
 
Join Date: 01 2004
Location: RA Army
Age: 47
Posts: 149
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Lightbulb

Quote:
Originally Posted by Masud
... I know it sould support Utf8 charset but it does not have a collation name : "utf8_general_ci."
You know the codepage for Armenian Unicode ?
thanks again
Yes, it should!

And of course collation name may/should differ! But I can't imagine, that there is no list of supported charsets/collations by M$ SQL Server in it's documentation!

I'm not interested in any Microsux related product, but simple query in google helped me to find the answer for your problem. Funny, but really threre is no collation for Unicode, they use special types instead:

Quote:
In Microsoft SQL Server, these data types support Unicode data:

* nchar

* nvarchar

* ntext

Note The n prefix for these data types comes from the SQL-92 standard for National (Unicode) data types.

Use of nchar, nvarchar, and ntext is the same as char, varchar, and text, respectively, except that:

* Unicode supports a wider range of characters.

* More space is needed to store Unicode characters.

* The maximum size of nchar and nvarchar columns is 4,000 characters, not 8,000 characters like char and varchar.

* Unicode constants are specified with a leading N: N'A Unicode string'.

* All Unicode data uses the same Unicode code page. Collations do not control the code page used for Unicode columns, only attributes such as comparison rules and case sensitivity.
http://msdn.microsoft.com/library/de...on_03_6voh.asp
Reply With Quote
Old 19.03.2004, 09:38   #11
nightmare
 
spawn's Avatar
 
Join Date: 05 2003
Location: Russia, Moscow
Age: 39
Posts: 279
Downloads: 0
Uploads: 0
Reputation: 20 | 3
Default

you can view www.aip.am... it can be an example for you ...
charset of pages is charset=windows-1251
then MSSQL set to the Cirillic_General_CL_AS ...
so the armenian unicode text saved htmlencoded ...
thats all ... SQLServer does'nt have a collection for unicode as I know ...
Reply With Quote
Old 20.03.2004, 12:49   #12
Младенец
 
Join Date: 03 2004
Location: Iran
Age: 34
Posts: 6
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by who
Yes, it should!

And of course collation name may/should differ! But I can't imagine, that there is no list of supported charsets/collations by M$ SQL Server in it's documentation!

I'm not interested in any Microsux related product, but simple query in google helped me to find the answer for your problem. Funny, but really threre is no collation for Unicode, they use special types instead:



http://msdn.microsoft.com/library/de...on_03_6voh.asp
I Uses n- Charachter Types but Data save characters is "?" it is really questionable ! why .
I Set My Page charset=windows-1251
I Set My Database Collation = Cyrlic_General_CL_AS
But Still I Get "???" instead of Characters
I really Thanks for your help , Now I'm exploring www.aip.am I hope I can Find something there
Reply With Quote
Old 20.03.2004, 16:30   #13
Moderator
 
acid's Avatar
 
Join Date: 09 2001
Location: South Korea, Gumi
Posts: 7,699
Downloads: 102
Uploads: 34
Blog Entries: 16
Reputation: 561 | 6
Default

Using charset windows-1251 definitely won't help. Use charset=utf-8 instead.
And I doubt Cyrlic_General_CL_AS is right collation.

Cheers.
Reply With Quote
Old 21.03.2004, 06:08   #14
Младенец
 
Join Date: 03 2004
Location: Iran
Age: 34
Posts: 6
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Hi
First I Use Charset = "Unicode UTF8" but with Sql_General_CL_AS does not work niether Cyrillic_General !! and Still Get ? instead of Characters
I try to look into www.aip.am but it is so slow and I can not even register into it.
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама
Индивидуалки Бауманская там .

All times are GMT. The time now is 03:02.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.