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?
also, can you output the string you are getting from the database?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Special characer in Database + problem in trimming it with trim()