如何在Mysql数据库中插入我的乌尔都语文本? [英] How Can I Insert My Urdu Text In Mysql Data Base ?

查看:129
本文介绍了如何在Mysql数据库中插入我的乌尔都语文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用varchar类型的字段和manully它允许插入urdu文本但是当我按表单添加它然后????在表字段中插入的值是??????怎么才能正确插入呢

i am using varchar type of field and manully it allows to insert urdu text but when i add it by form then ???? value are inserted in the table fields are ?????? how can i proper inserted it

推荐答案

尝试使用这个



try using this

VARCHAR(n) CHARSET ucs2


您好



Varchar类型的字段允许您在数据库中插入任何类型的数据,它将轻松保存您的表单字段,无论您是用英语,乌尔都语,阿拉伯语等编写。
Hi

Varchar type of field allow you insert any type of data in database it will easily save your Form Field either you are writing in English, Urdu , Arabic etc.


Urdu has对字符串数据进行不同的编码和解码,因此在保存时,必须以一次提取的形式保存数据,必须使用相同的乌尔都语编码才能获得。



你唯一应该做的是,如果数据库不允许任何设置,你仍然会收到此错误,那么请尝试保存数据的字节。



但请记住,Unicode编码是唯一允许使用世俗语言的编码,其他字符集只允许使用英语。这就是为什么,您的整个字符集编码必须更改为Unicode。它与为HTML文档等设置的编码相同。这告诉环境(软件应用程序)提供的文档是/并且必须根据Unicode标准进行格式化。
Urdu has a different encoding and decoding of the string data and thus when saving it the data must be saved in a form that once extract it must be the same Urdu encoding for you to get.

The only thing you should do is, if the database isn't allowing any setting and you're still getting this error, then try saving the bytes of the data.

But remember, Unicode encoding is the only encoding that allows the worldly languages, other character sets allow only English. That is why, your entire encoding of character set must be changed to Unicode. It is the same encoding that is set for the HTML document etc. This tells the environment (software application) that the document that is provided is/and must be formatted according to the Unicode standards.


这篇关于如何在Mysql数据库中插入我的乌尔都语文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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