You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Aurélien DEHAY <ad...@zorel.org> on 2005/04/08 14:31:42 UTC

Auth-fw and utf-8 logins

Hello.

I'm experiencing strange behaviour using:

- auth-fw
- flow (the
org/apache/cocoon/webapps/authentication/flow/javascript/auth.js file
from auth-fw block)
- a simple login.xsp file making request on a database (which is used by
the authentication pipeline configured in the <handler/>)

I've wrote a flow file to handle the user input, and like in the
samples, I'm using:

if (auth_login(handler, null, {"parameter_login":login,
"parameter_password":password})) { etc. etc.

If I try a utf-8 login, the parameters are good in the flow, but not in
the xsp. For examples, if I output the value of the login, I've € in the
flowscript, but ⬠in the login.xsp.

I'm not a java dev, I've search in the source code without seeing
anything relevant. I've tried several solution, without succedding to
have good utf-8 parameters in login.xsp.

Is anyone ever tried this?

Rgds.


-- 
Aurélien DEHAY <ad...@zorel.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re:[SOLVED] Auth-fw and utf-8 logins

Posted by Aurélien DEHAY <ad...@zorel.org>.
Solved.

Had to replace:
String user=<input:get-attribute module="raw-request-param" name="login" as="string"/>;

by 

String user=new String(<input:get-attribute module="raw-request-param" name="login" as="string"/>.getBytes("iso-8859-1"),"utf-8");

in my login.xsp. It seems like somewhere in the auth-fw the characters
are being reencoded or something like that.

-- 
Aurélien DEHAY   http://zorel.org
      http://logicielslibres.info