This question about Using an extension: Needs followup in Tasks

Foswiki breaks when submitting form with international characters

I run Foswiki with utf-8, and designed a form in a topic using formplugin (with the relative template and dataform), that creates and saves a new topic. All variablenames are in English, all content is in Greek. There is also a search that displays all topics created by this form.

The topic gets its name automatically through the

action="save"
topic="%WEB%.QualObjNoAUTOINC0001"

When filling the formfields (one text, size 160 and one textarea 5x160 ) in greek and submitting the new topic, I get a white screen with the following error:

Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.
Malformed UTF-8 character (fatal)

If i fill the formfields in english, all is well (no errors).

If i fill the first formfield (text, size 160) with 10 characters, all is well (no errors).

On the other hand, if i refresh the page, the search always displays the new topic with no problem, but if i try to view it i get the same error.

This happens intermittently (it always happens on this form, but not on another, although they are about the same) and one probable cause would be that this may be falsely reported as "malformed UTF-8" and be a shortcoming of the perl regular expression for determining web and topic name in Foswiki.pm, line 1359, because this is the first error that gets reported by apache in system log files.

Any suggestions?

-- StefanosKouzof - 11 Feb 2010

I found a solution, myself. In Formplugin.pm in line 24, there is a statement:

 use utf8 

This statement forces perl to use the loose implementation of the UTF-8 standard. I tried changing the statement to "use UTF-8" and "use UTF8", and all foreign language content displayed normally with no errors, but all parameters (STARTFORM etc) were displayed as normal text in the topic. So, i removed the statement (commented it out) and all works as it should be.

# use utf8 

Hope this helps a bit with the issue of UTF-8 support in Foswiki

QuestionForm edit

Subject Using an extension
Extension FormPlugin
Version Foswiki 1.0.9
Status Needs followup in Tasks
Topic revision: r2 - 11 Feb 2010, StefanosKouzof
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy