This error will come when we are doing some data encoding in HTML encoding in ASP.net. The following code is solution for the same...
string asAscii = Encoding.ASCII.GetString(
Encoding.Convert(
Encoding.UTF8,
Encoding.GetEncoding(
Encoding.ASCII.EncodingName,
new EncoderReplacementFallback(string.Empty),
new DecoderExceptionFallback()
),
Encoding.UTF8.GetBytes(line)
)
this might be save your time.....
Happy Coding..
Thanks,
Rajesh
No comments:
Post a Comment