如果值是印地语,则在MY SQL中插入值 [英] Inserting value in MY SQL if value is in Hindi

查看:100
本文介绍了如果值是印地语,则在MY SQL中插入值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



我正在使用Gmail抓取邮件,如果邮件内容是英文的话,它的效果很好。但我的要求是邮件是印地语(印度语)还是有一些附件如何将它们保存在Datbase(MY-SQL)中。印地语字体显示为?????????在数据库中。





Hello friends,

I am fetching mail using Gmail and its working well if Mail content is in English. But My requirement is if mail is in Hindi(Indian Language) or there is some attachment how to save them in Datbase(MY-SQL). Hindi fonts are showing as a "?????????" in the database.


public void InsertMail(string uid, string from, string to, string subject, DateTime datetime, string message)
        {
            try
            {

                MySqlCommand cmd = new MySqlCommand();

                cmd.Parameters.AddWithValue("@unique_id", uid);
                cmd.Parameters.AddWithValue("@sender", from);
                cmd.Parameters.AddWithValue("@reciever", to);
                cmd.Parameters.AddWithValue("@subject", subject);
                cmd.Parameters.AddWithValue("@date", datetime);
                cmd.Parameters.AddWithValue("@message", message);
                cmd.Parameters.AddWithValue("@mail_status", "unread");
                cmd.Connection = con;
                string query = "Insert Ignore into gmail_inbox1(unique_id,sender,reciever,subject,date,message,mail_status) values (@unique_id,@sender,@reciever,@subject,@date,@message,@mail_status) ";
                cmd.CommandText = query;
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {

            }

        }







谢谢&问候

Neetesh




Thanks & Regards
Neetesh

推荐答案

我已经回复了这个 [此处]。
I have answered this [here].


这篇关于如果值是印地语,则在MY SQL中插入值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆