Zend_form:不接受拉丁字符(ú、ë 等?
我无法让 Zend_form 接受任何插入的拉丁字符(ü、é 等)。 即使我没有验证它也不接受这一点。
现在有人如何让它发挥作用吗?
格。胡说
I can't get Zend_form to accept any inserted latin characters (ü, é, etc).
Even if I'm not validating it doesn't accept this.
Does anyone now how to get this to work?
Gr. Tosh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过几次测试,这似乎是一个简单的字符编码问题。
您的服务器可能未提供采用 UTF-8 编码的文档。您可以轻松地在视图/布局中强制执行此操作,方法是将其放置在
中(最好作为第一个子项)
,或者如果使用 HTML 5 doctype
设置 < code>Zend_View 编码以及在您的应用程序配置文件中,尽管这在我的测试中不是必需的(我认为“UTF-8”无论如何是默认值)
After doing a couple of tests, it seems to be a simple character encoding issue.
Your server is probably not delivering documents with UTF-8 encoding. You can easily force this in your view / layout by placing this in your
<head>
(preferably as the first child)or if using a HTML 5 doctype
It probably doesn't hurt to set the
Zend_View
encoding as well in your application config file though this wasn't necessary in my tests (I think "UTF-8" is the default anyway)