We had classis ASP application (which caters services to global users) and we set encoding to Windows-1252, and its been there for long time. And few years back we migrated to ASP.Net but left the encoding to windows-1252 ( to support existing data)
Recent days we have encountered problems with Japaneese and Chinese users, so decided to change encoding to UTF-8,
So what is best approach to minimize the issues for existing data ( which was stored in windows-1252 ).
Not sure, what you mean by best approach. If you switch your data to UTF-8, clients that receive the data and expect Windows-1252 will break unless they are automatically sniffing the encoding properly.
Changing the encoding is easy enough to do in web.config with:
One thing you can do is allow for a flag (querystring flag or request header) on the request to specify which encoding should be returned. Then in your actual code that generates output you can set Response.Encoding as needed in code.
None
0 Points
1 Post
encoding issues
Sep 16, 2011 10:31 AM|Mogili|LINK
Hi All,
We had classis ASP application (which caters services to global users) and we set encoding to Windows-1252, and its been there for long time. And few years back we migrated to ASP.Net but left the encoding to windows-1252 ( to support existing data)
Recent days we have encountered problems with Japaneese and Chinese users, so decided to change encoding to UTF-8,
So what is best approach to minimize the issues for existing data ( which was stored in windows-1252 ).
Thnanks
Mogili.
Member
450 Points
144 Posts
Re: encoding issues
Sep 20, 2011 06:15 AM|wangping827123|LINK
refer
http://msdn.microsoft.com/en-us/library/kdcak6ye.aspx
http://www.velocityreviews.com/forums/t300384-disadvantages-of-using-windows-1252-codepage.html
Participant
1471 Points
442 Posts
ASPInsiders
MVP
Re: encoding issues
Sep 20, 2011 07:54 PM|rstrahl|LINK
Not sure, what you mean by best approach. If you switch your data to UTF-8, clients that receive the data and expect Windows-1252 will break unless they are automatically sniffing the encoding properly.
Changing the encoding is easy enough to do in web.config with:
One thing you can do is allow for a flag (querystring flag or request header) on the request to specify which encoding should be returned. Then in your actual code that generates output you can set Response.Encoding as needed in code.
This way you can serve responses both ways overriding whatever global settings are made to ASP.NET.
+++ Rick ---
West Wind Technologies
Making waves on the Web
weblog.west-wind.com
Check out: Markdown Monster