0

I'm making an Arabic website , and after I create the database and start writing Arabic text inside it , it just show ???? , so I change the collation of my Database from SQL_Latien to Arabic_CI_AI

but I'm still getting the ???? inside my fields and when I check the properties of the field I found it SQL_Latien and it doesn't change

so what should I do to fix this problem without repeating building the database

please reply as soon as you can

Thanks in Advance

2 Answers 2

1

Database collation is just the default setting for new columns.

To change the collation of an existing column, you'd have to alter table. For example:

alter table YourTable alter column col1 varchar(10) collate Arabic_CI_AI
Sign up to request clarification or add additional context in comments.

3 Comments

Does the same apply to the default setting for the server/instance and separately to a database? If so, I'd recommend changing the collation sequence in both places, and then updating the existing tables.
@Dems: New databases are copied from the model database. I don't think there is a server-wide default collation.
Thank you very much its save my time. i changed collation setting from latin to Arabic_CI_AI and after that also i got ?? in my table while inserting arabic. after i alter the table it works fine. Thanks again Andomar
0

The collation sequence is the order in which characters appear when you sort (ie. use the 'ORDER BY' clause). Different collations will result in different sort orders.
This is obviously NOT what you are looking for. You problem is storing and retrieving UNICODE characters outside the ASCII range (ie. Arabic characters). To do that, the data types storing this data must support UNICODE, instead of ASCII. Simply, when defining a column, use the data types nchar, nvarchar, and ntext, instead of char, varchar and text.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.