cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gou...@osmosis.gr
Subject possible bug in flow related with encoding
Date Mon, 24 Jan 2005 10:09:30 GMT
hi people 

after many tests i think that this is about a small bug than a 
misconfiguration so i post it in this list

i have configure all serializers encoding in sitemap to UTF-8
and i try to post greek charakters

in my main scenario where cforms post data and flow grab them and call 
custom java classes i have no problem

in one case i have a simple form (web form) that post just a string
i try to grab this in a flow function 

...
function searchProjects(){
    var searchstring   = cocoon.request.get("searchstring");
    print(searchstring);
    var DAO = new 
Packages.gr.osmosis.apografi.db.DAOFactory.getDAOFactory(Packages.gr.osmosis.apografi.db.DAOFactory.ODBC);
    var projects= DAO.getProjectDAO().findProjectByText(searchstring);
        
    var viewData;
    viewData = {
     	list : projects
    }
    
    cocoon.sendPage("listProjects.form", viewData);
}

...

here the searchstring is comming as "????????", one ? for each charakter

i have test bot get and post methods in my webform with the same result

farthermore 
i have try to use an .xsp page 
to grab this post and generate a simple .xml.

...
<data>
  <xsp:logic>
   String searchstring = <xsp-request:get-parameter name="searchstring"/>;
  </xsp:logic>
  <param> 
    <xsp:expr>searchstring</xsp:expr>
  </param>
</data>
...

here everything work fine and my posted string (greek charakters) is 
displayed corectly


the way i use to set form encoding 
is to add this action in my pipeline

<map:act type="set-encoding">
  <map:parameter name="form-encoding" value="utf-8"/>
</map:act>


to summarize:
posting data from cforms to flow work fine
posting data from simple forms to .xsp work fine
posting data from simple forms to flow _loose_ encoding


is this realy a bug or i miss something


regard

stavros



Mime
View raw message