Reputation: 11
I have tried to export html data to database with UTF-8 encoding.But I am seeing some "Broken characters" in the database.For example:
while exporting the html data
· A contribution .....
· Choice between two .............
into the database with UTF-8.The (.)midpoint in the data is converted in to (Â.).I need to convert the data explicitly to ISO-8859-1 by removing the broken character in c#. Is there any way to do that ? Thanks in Advance
Upvotes: 1
Views: 415
Reputation: 109822
There is a way to specify methods to be invoked in order to handle bad characters when encoding and decoding. You can substitute other characters, or throw an exception, or provide logging etc.
See this overload of GetEncoding() for details.
Upvotes: 1