Hi Haj, Thank you for the reply.
1.Data comes from the Database, as it is same as you look on the web application.
2. Yes, Perl code is running as part of web application.
3. TestStr is basically coming from database which got inserted while submit Form from the application itself, but at the time of showing this string on the web application this issue occurs.
as I said earlier, I have strings with mixed encodings, which means that one string is differently encoded with another due to upgrade of application from legacy application.