I have this SQL code
declare @s varchar(8000) = 'manoeuvre'
select CHARINDEX(char(140), @s, 0)
char(140) = Œ, which dose not exist in the string ‘manoeuvre’.
yet SQL server returns the following
4 (indicating it had located the char(140) on this line)
if I replace ‘Œ’ with a ‘*’ I get
man*uvre
it seem like SQL has replaced the ‘o’ and ‘e’ with the one character, but why?
why is is replacing ‘oe’ with ‘Œ’?
the same effect can be see with the string ‘mass’ and ‘ß’ (which I believe is German for double s). replacing on this character returns the sting ‘ma*’.
Is SQL trying to do something “smart” under the covers?
EDIT
Extra information:
SQL server 2008 R2.
collation of database is Latin1_General_CI_AS.
If you look up that sign (ASCII 140) it is described as
See http://www.table-ascii.com for instance
try
which will do a binary search.