SQL Server not difference between 'ی' and 'ي' in Arabic_CI_AS collation

Viewed 1829

I'm using ASCII function for getting equivalent ASCII code of two characters, but I'm surprised when seeing there is no difference between 'ي' and 'ی', can anyone help me?

SELECT ASCII('ي'), ASCII('ی')
5 Answers

The story becomes interesting when we have the following scripts:

SELECT ASCII('ك'), ASCII('ک');

SELECT
CASE
    WHEN 'ك' COLLATE Arabic_CI_AS <> 'ک' COLLATE Arabic_CI_AS
    THEN 1 ELSE 0 END AS are_different_ascii,
CASE WHEN N'ك' COLLATE Arabic_CI_AS <> N'ک' COLLATE Arabic_CI_AS
    THEN 1 ELSE 0 END AS are_different_unicode;

The letter ک and ك seems to be an exception!

Isn't that so?

Related