[html-formfu] unicode and yml?

Carl Franks fireartist at gmail.com
Mon Sep 24 12:37:30 GMT 2007

On 24/09/2007, Josef Chladek <josef.chladek at gmail.com> wrote:
> hello list,
> when I use the config from yml [1], my output is wrong, as soon as I
> put [% form %] in my tt (umlauts garbled).
> when I do the config in my Controller [2], everything's working.
> following the thread in
> http://lists.scsys.co.uk/pipermail/html-formfu/2007-August/000190.html
> looked like that the yml/unicode problem was solved (I'm using
> YAML::Syck 0.97) - any chance on getting this working correctly with
> yml files?

Are you saving the files as utf-8, or some iso variant?
If you're using utf-8, then it should work - I don't know about other
encodings though.

When you tested with umlauts in the controller, did you "use utf8;" in the file?
Because you should have needed to. If it appeared to work without
that, then something was still going wrong.

FormFu sets the appropriate flags to make both YAML::Syck and TT
handle utf-8 correctly (see ObjectUtil.pm load_config_file() and
Render/base.pm xhtml() for details)
- so my first suggestion is to ensure your yaml + TT files are utf-8
encoded, and then, if you're viewing this in a browser, ensure you're
setting the page encoding, or if you're viewing this in a console,
make sure it can display unicode ok.

The examples you sent didn't seem to have any umlauts in - was that intended?


More information about the HTML-FormFu mailing list