Raza Mohd wrote:Actually i am fetching the data from database which is having this special character.

but when i trim it i dont get the data excluded from that special character.

right. don't use trim(). trim only gets rid of whitespace. a symbol that looks like pi does not qualify as whitespace.
what happens when you use the replaceAll() example against the result of the fetch from the database?