2

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

Tosh
  • 1,789
  • 15
  • 20

1 Answers1

1

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)

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

or if using a HTML 5 doctype

<meta charset="utf-8">

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)

resources.view.encoding = "utf-8"
Phil
  • 157,677
  • 23
  • 242
  • 245
  • I found out what I was doing wrong. I was using the htmlenitities filter and at the same time tried to validate for only alpha characters, this doesn't work :), maybe if you do it in the right order – Tosh Oct 26 '11 at 11:04