If you want to encode this kind of character, you should use a html encoder instead.
In C#, you can use this :
string result = System.Web.HttpUtility.HtmlEncode("Sample string ©");
If you want to replace every character one by one, you can use the code of Sudhakar Tillapudi. His answer is valid, but you are going to do a lot of replace.
The website DotNetPerls has a good example of HtmlEncode
:
using System;
using System.Net;
class Program
{
static void Main()
{
string a = WebUtility.HtmlEncode("<html><head><title>T</title></head></html>");
string b = WebUtility.HtmlDecode(a);
Console.WriteLine("After HtmlEncode: " + a);
Console.WriteLine("After HtmlDecode: " + b);
}
}
Output :
After HtmlEncode:
<html><head><title>T</title></head></html>
After HtmlDecode:
<html><head><title>T</title></head></html>