Thanks, that solved it. We were using "GET" for debugging but as soon as
we switched to "POST" it worked because we already had the
character coding set in our servlet.
--
Colin
On Tue, 2005-12-20 at 20:23, Liina Enok wrote:
> It's because by default Tomcat uses ISO 8859-1for handling form data.
>=20
> You need to set the right encoding in the client that handles the form=20
> data, e.g request.setCharacterEncoding("UTF-8");
>=20
> For the custom-built search client if it's Tomcat servlet you can add=20
> connector parameter URIEncoding=3D"UTF-8" to server.xml. This specifies=
=20
> the character encoding used to decode the URI bytes, after %xx decoding=
=20
> the URL. If not specified, ISO-8859-1 will be used.
> But this only applies to GET parameters and does nothing for POST=20
> parameters.
> So for fedora's own webapp the way around it is to edit the source file=
=20
> FieldSearchServlet.java in src/java/fedora/server/access and add=20
> request.setCharacterEncoding("UTF-8") to doPost method
>=20
> /** Exactly the same behavior as doGet. */
> public void doPost(HttpServletRequest request, HttpServletResponse=20
> response)
> throws ServletException, IOException {
> request.setCharacterEncoding("UTF-8"); // add this line
> doGet(request, response);
> }
>=20
>=20
> And then of course compile it, copy to webapps/fedora/classes/... and=20
> restart fedora :)
>=20
> Does anyone know a better solution?
>=20
> Liina
>=20
> Liina Enok
> Project Manager
> National Library of Estonia
> Information Systems
> phone: (+372) 630 7180
> e-mail: liina@...
>=20
> Colin Rosenthal wrote:
>=20
> >I'm trying to run a search using the webgui with
> >title~'*n=E5r*' .
> >The search fails to find the expected data and, when=20
> >the page reloads, the search string has been corrupted to=20
> >title~'*n=C3=A5r*'
> >
> >Our own custom-built search client fails similarly. Any
> >suggestions?
> >
> >--
> >Colin
> >
> >
> >_______________________________________________
> >Fedora-users mailing list
> >Fedora-users@...
> >http://comm.nsdl.org/mailman/listinfo/fedora-users
> > =20
> >
>=20
|