Marvin,

This question has come up a few times and we've actually probably answered
it providing both the solutions you mentioned below.  That means its
probably a good thing to document (which of of course, we never get around
to actually doing!).  If you get a minute, I would be eternally grateful if
you documented it ;-)

Cheers,
Scott


On Thu, Sep 3, 2009 at 12:11 PM, Marvin Addison <[email protected]>wrote:

> Over the past year or so a number of folks have posted questions for
> suggestions on how to deal with non-ascii data.  We recently addressed
> this ourselves by adding support for passwords containing non-ascii
> characters.  Although our LDAP infrastructure supports it, CAS did
> not.  I'd like to sketch out the points of our solution since I don't
> think it's been discussed fully anywhere.  Perhaps this can be moved
> to the wiki if there's interest.
>
>  1. Ensure pageEncoding of login form JSP is UTF-8, <%@ page
> pageEncoding="UTF-8" %>
>  2. Ensure the HTML content type is UTF-8:
>    <%@ page contentType="text/html; charset=UTF-8" %>
>    and
>    <head>
>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>      ...
>    </head>
>    (perhaps this is redundant, but it works nonetheless)
>  3. Set the request characterEncoding property to UTF-8:
>    request.setCharacterEncoding("UTF-8");
>
> The last point is one I had never heard discussed and was essential to
> supporting username/password credentials containing non-ascii
> characters.  We took a recommendation from
> http://wiki.apache.org/tomcat/Tomcat/UTF-8 to implement setting
> character encoding as a filter,
>
> http://code.google.com/p/vt-middleware/wiki/vtservletfilters#CharacterEncodingFilter
> .
>  This approach appears to work well.
>
> Hope that helps,
> M
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to