Click here to Skip to main content
15,881,715 members

Comments by .NET- India (Top 31 by date)

.NET- India 16-Sep-21 9:07am View    
I have also encoded my code on "UTF-8" but still getting same result. So i would have to make some changes at my code to run it on Server because on localhost it's already running no need to encode my code......

Encoding objISO = Encoding.GetEncoding("ISO-8859-1");
Encoding objUTF = Encoding.UTF8;

// Unicode string.
string s_unicode = name;

// Convert to ISO-8859-1 bytes.
byte[] isoBytes = objISO.GetBytes(s_unicode);

// Convert to UTF-8.
byte[] utf8Bytes = Encoding.Convert(objISO, objUTF, isoBytes);

string utf8str = objUTF.GetString(utf8Bytes);
return utf8str;
.NET- India 16-Sep-21 9:04am View    
Deleted
I have also encoded my code on "UTF-8" but still getting same result. So i would have to make some changes at my code to run it on Server because on localhost it's already running no need to encode my code......
.NET- India 16-Sep-21 7:59am View    
I have encoded my body string into "ISO-8859-1", but now string being converted into "question mark(?)" from "black diamond question mark" as given below...
d�avoir = d?avoir
à = ?
procédure = proc?dure

Following given code i'm using for conversion.....
-----------------
public string EncodeISO(string name)
{
Encoding objISO = Encoding.GetEncoding("ISO-8859-1");
string s_unicode = name;

// Convert to ISO-8859-1 bytes.
byte[] isoBytes = objISO.GetBytes(s_unicode);

string str = objISO.GetString(isoBytes);
return str;
}
.NET- India 19-Aug-21 10:29am View    
Yes, same question, but yesterday i was not able to send the mail. But today mail is being sent in alternate way i.e. once mail will be delivered but next time it won't, then it will be and after that it will not be.....
.NET- India 18-Aug-21 5:04am View    
No