tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mester József <>
Subject Re: Character encoding
Date Fri, 15 Dec 2006 09:44:28 GMT
Hello Mark

>This is unlikely to help you and may be read-only on your JVM.

>You don't say what doesn't work but generally the following is required:
>set URIEncoding="UTF-8" on the connector
>set the the correct response encoding on every response (you can do
>this per page or use a filter to do this for all pages)
Ok. Let's see my problem. 
I have a form with text input box. I type Árvíztűrő tükörfúrógép and I get " ÃrvíztűrÅ

Beautiful isn't it? 
The page is:

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Try encoding</title>
    <% try {
    catch (Exception ex) {
        out.println("Bad something: " +ex.getMessage());
    } %>
    <form accept-charset="UTF-8" action="index.jsp" method="POST">
        <input type="text" name="nev">
        <input type="submit" value="Send name">        

>If you use a database make sure that you persist your data in the
>correct encoding.
If my text came from database everything is correct.

>If you convert from bytes to characters or characters to bytes makde
>sure you use the correct encoding.
I don't.


Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message