从SQL发送到手机乌尔都语的消息,是在无法读取的格式是在、发送到手机、消息、格式

由网友(斯文败类)分享简介:我分配乌尔都语文本在C#中的变量并将其插入到数据库中(SendMessages表),这样可以节省乌尔都语消息完全没有任何修饰,伟大的,但在没有接到为所有的手机的消息,然后将其显示为 ?????????????????????? ,为什么呢?我检查与完美,但没有收到其他乌尔都语信息这一块全部乌尔都语兼容的手机。 I a...

我分配乌尔都语文本在C#中的变量并将其插入到数据库中(SendMessages表),这样可以节省乌尔都语消息完全没有任何修饰,伟大的,但在没有接到为所有的手机的消息,然后将其显示为 ?????????????????????? ,为什么呢?我检查与完美,但没有收到其他乌尔都语信息这一块全部乌尔都语兼容的手机。

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:

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;

                        }

在简单的话,被从C#传递到SQL表乌尔都语消息是罚款和完善,而不是问题,但接受相同的短信在手机后,它并没有这样的。

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.

为什么?帮帮我 ? 我使用asp.net C#.NET 4.0与SQL Server 2014年。

why ? help ? I am using asp.net C#.net 4.0 with sql server 2014.

推荐答案

一个想法可能是在数据库中使用 VARCHAR ,然后按照步骤

An idea could be use varchar in your database and follow the steps

使用基地64将数据保存到数据库 使用 Encoding.UTF8 来获得字节,并将其转换为的Base64 当读取从数据库中使用的数据 Encoding.UTF8.GetString(Convert.FromBase64String(价值),并使用这个值来显示。 Use base 64 to save the data into data base Use Encoding.UTF8 to get bytes and convert them to Base64 When fetch data from database use Encoding.UTF8.GetString(Convert.FromBase64String("value") and use this value to display.
阅读全文

相关推荐

最新文章