php表单提交utf8? [英] php form submit utf8?

查看:128
本文介绍了php表单提交utf8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上,有一个简单的文本区域的表单供人们发表评论。问题是有时我会接收到uft8中的信息,有时候会在iso中收到信息。可以控制吗?

In my website there is a form with a simple textarea for people to post comments. The problem is that sometimes I receive info in uft8 and sometimes in iso. Is it possible to control that?

也许我做错了,但浏览器是否可能会更改发送的数据的编纂?

Maybe I am doing something wrong, but is it possible that the browser changes the codification of the data it sends?

谢谢

推荐答案

如果你想确定你接受的是什么字符集,以你的形式设置

If you want to be sure of what character set you are accepting, set it in your form

<form method="post" action="/your/url/" accept-charset="UTF-8">
</form>

您可以在这里看到所有可接受的字符集:字符集

You can see all the acceptable character sets here: Character Sets

这篇关于php表单提交utf8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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