[html-formfu] unicode and yml?
josef.chladek at gmail.com
Mon Sep 24 14:14:41 GMT 2007
Am 24.09.2007 um 14:39 schrieb Carl Franks:
> On 24/09/2007, Josef Chladek <josef.chladek at gmail.com> wrote:
>> Am 24.09.2007 um 13:37 schrieb Carl Franks:
>>> On 24/09/2007, Josef Chladek <josef.chladek at gmail.com> wrote:
>>>> hello list,
>>>> when I use the config from yml , my output is wrong, as soon
>>>> as I
>>>> put [% form %] in my tt (umlauts garbled).
>>>> when I do the config in my Controller , everything's working.
>>>> following the thread in
>>>> looked like that the yml/unicode problem was solved (I'm using
>>>> YAML::Syck 0.97) - any chance on getting this working correctly
>>>> 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
>>> encodings though.
>> yes, unicode everywhere - there are no umlauts in the yml file (nor
>> the corresponding code in the controller), but the files are saved
>> utf8 (textmate and vim say so) and the controller uses 'use utf8;'
>>> 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
>>> 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
>> yes, the umlauts are in the tt files and as soon as [% form %]
>> appears they are broken.
>> in the View::TT I use
>> DEFAULT_ENCODING => 'UTF-8',
>> I tried to comment out as much as possible in the formfu files: as
>> soon as
>> in start_form is processed, the umlauts are bad.
>> with the controller code everything's working except that I can't get
>> what is needed to populate the form after a submit?
> FormFu passes ('ENCODING' => 'UTF-8') to TT, but I can't see anything
> about TT using a DEFAULT_ENCODING setting.
> Have you tried outputting the source to your console to check exactly
> what's being output?
> $ script/myapp_test /
> Other than that, I can't think of much else.
> If you can replicate the problem with a minimal Catalyst application,
> you could send that to the list.
made a test-app from scratch - ulauts and FormFu working there
without a problem. I'll investigate my app and will report what
happened. if I use Config::General format, there are no problems
(like with the config in the controller), strange...
thanks for now
More information about the HTML-FormFu