使用 enctype= multipart/form-data 和阿拉伯语 [英] using enctype= multipart/form-data with arabic language

查看:37
本文介绍了使用 enctype= multipart/form-data 和阿拉伯语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用具有文本区域并上传文件的表单,现在当用户编写阿拉伯语时,它会像这样保存到 mysql:

am trying to use a form that has a textarea and uploads a file , now when the user writes arabic it saves to mysql like this :

بسيبيبي&

注意 mysql 中 Field 的编码是 utf8-general-ci ,所以我认为问题在于使用 enctype= multipart/form-data ,那你认为我应该怎么做?

Note that the encoding for the Field in mysql is utf8-general-ci , so i think that the problem is in using enctype= multipart/form-data , so what do you think i should do ?

推荐答案

在将阿拉伯文本(textarea)插入数据库之前,将其从字符集iso-8859-1"转换为字符集WINDOWS-1256"或字符集UTF"-8" 取决于您使用的阿拉伯字符集

Before inserting the Arabic text (textarea) in database, convert it from charset "iso-8859-1" to charset "WINDOWS-1256" or charset "UTF-8" depends on the Arabic charset you use

这篇关于使用 enctype= multipart/form-data 和阿拉伯语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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