sql - Two characters with the same ASCII Code? -


i'm trying clean imported sql server 2008 database have many invalid charcters application. , found different characters same ascii code, ¿that posible?.

if execute query:

select ascii('║'), ascii('¦') 

i get:

166 166 

i need similar work, .net code.

if ask these char in .net:

? ((int)'║').tostring() + ", " + ((int)'¦').tostring() get: "9553, 166" 

anybody can explain happens

instead of ascii, use unicode function.

both , | not ascii characters, calling ascii them convert incorrectly , result in wrong value.

additionally, need use unicode strings when calling unicode function, using n prefix:

select unicode(n'║'), unicode(n'|') -- results in: 9553, 166 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -