Japanese character stored in SQL Server DB using ASP page that assumed it as ISO-8859-1 encoding

Posted by Vishal Seth on Stack Overflow See other posts from Stack Overflow or by Vishal Seth
Published on 2010-03-18T03:19:17Z Indexed on 2010/03/18 3:21 UTC
Read the original article Hit count: 196

We have a legacy ASP based product that allowed the UI and Data languages of user groups to be configured according to their locations. CodePage and CharSet in ASP pages collecting data was set accordingly.

I've noticed few instances in the SQL Server DB where users posted Japanese characters in the ASP page that assumes the oncoming stream to be of ISO-8859-1/Western and as a result, the data in the SQL table has gobbled up.

While upgrading the client to our new product, I want to back-convert those "garbage" Japanese (in some instances Chinese) characters back to their actual form.

Can I create some utility ASP page that would go through such data values and "fix" the wrongly-encoded strings and store everything back as utf-8 strings? In any case, I don't want to affect my French/Spanish/English characters that might be there as well.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about character-encoding