I am assigning Urdu text to a variable in c# and inserting it into database (SendMessages table), it saves Urdu message perfectly without any modification, great but when that message is received in any mobile handset then it appears as ??????????????????????, why ? i checked it with all urdu compatible handsets which receive other urdu messages perfectly but not this one.
Code asp.net:
String MessageLanguage= Convert.ToString(ViewState["LanguageCode"]); //
if (MessageLanguage == "ur")
{
String UrduMsg = ComplaintCode +" "+"اپکی سثیکایت درج کردی گیؑ ھے۔ سثیکایت کوڈ یہ ہے";
quebiz.Insert(lblContact.Text, UrduMsg, null, Convert.ToInt32(lblComplainantID.Text), null, null);
ViewState["LanguageCode"] = null;
}
In simple words, urdu message being passed from C# into sql table is fine and perfect, not problem but after receiving same sms in handset, it doesn't work that way. I tried base64 conversion like
String UrduMsg = ComplaintCode +" "+"اپکی سثیکایت درج کردی گیؑ ھے۔ سثیکایت کوڈ یہ ہے";
var UrduMsgBytes = System.Text.Encoding.UTF8.GetBytes(UrduMsg);
var Base64EncodedUrduMsg = Convert.ToBase64String(UrduMsgBytes);
but it resulted in saving a long string in database like it is rendering yu98yhr9h93h99hd9h9ash9dhas9yr090u0usjaosfhiehhw8hw
.
Collation on column is ON, column is Nvarchar(1600).
why ? help ? I am using asp.net C#.net 4.0 with sql server 2014.