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('ی')
Because your character is non Unicode you have to use UNICODE()
function instead of ASCII()
.
SELECT ASCII('ي'), ASCII('ی')
will result: 237
, 237
but
SELECT UNICODE(N'ي'), UNICODE(N'ی')
will result: 1610
, 1740