Re: search strings using foreign characters

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Damon" <damonf@xxxxxxx> wrote in message
news:1153347237.900185.84620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Dica wrote:
i've taken over a web app built by another developer. he was stripping out
special characters and replacing with standard ones when searching our
people table. for instance:

"é" was replaced with "e". this seemed to work fine and would return names
like 'Jose' as well as 'José'. as a matter of fact, 'é' doesn't even seem
to
be recognized as a statement like 'select * from people where lastName
like
'%é%' ' returns nothing. so, it seems like replacing é for e is the right
thing to do here.

however, he was also replacing "ã" with "a", but this character seems to
be
different. if we replace "ã" with "a", i get no matches when searching for
a
last name like "Simão".

anybody know why some of these characters are ignored while others aren't?


Dica,

I personally have not had to deal with this issue. However, I might
try replacing all the special characters with _. So you would have the
statement. select * from people where lastName like '%Sim_o%' This
will replace any single character.

Hope this helps.
Damon.

excellent suggestion. tks damon.


.



Relevant Pages

  • search strings using foreign characters
    ... special characters and replacing with standard ones when searching our ...
    (microsoft.public.sqlserver)
  • Re: search strings using foreign characters
    ... special characters and replacing with standard ones when searching our ... like 'Jose' as well as 'José'. ... as a matter of fact, ... try replacing all the special characters with _. ...
    (microsoft.public.sqlserver)
  • Re: looping through text with array_key_exists function
    ... This gives me one large string that I can easily insert into a webpage. ... // start replacing; the special characters will generate invalid image ... you will only have to maintain the $special array and leave the ...
    (alt.php)
  • Re: looping through text with array_key_exists function
    ... Tricky thing, however, is that img tags contain spaces and you only want to ... // start replacing; the special characters will generate invalid image ... you will only have to maintain the $special array and leave the ...
    (alt.php)
  • Re: tclsoap illegal characters
    ... so we ended up writing a parser to look for those special characters in ... values and "solve" the problem by replacing with something else or a ... Kind regards ...
    (comp.lang.tcl)