Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 74371 invoked from network); 9 Jul 2007 21:28:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2007 21:28:07 -0000 Received: (qmail 99386 invoked by uid 500); 9 Jul 2007 21:28:07 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 99200 invoked by uid 500); 9 Jul 2007 21:28:06 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 99189 invoked by uid 99); 9 Jul 2007 21:28:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 14:28:06 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [212.247.90.225] (HELO mail.scandorama.se) (212.247.90.225) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 14:28:02 -0700 Received: from localhost (kreon.scandorama.se [10.48.37.12]) by mail.scandorama.se (Postfix) with ESMTP id 6F8481C9B7 for ; Mon, 9 Jul 2007 23:27:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at kreon.scandorama.se Received: from mail.scandorama.se ([10.48.37.4]) by localhost (kreon.scandorama.se [10.48.37.12]) (amavisd-new, port 10025) with ESMTP id ZJcloZK62EcM for ; Mon, 9 Jul 2007 23:27:33 +0200 (CEST) Received: from [192.168.2.230] (h-240-180.A218.cust.bahnhof.se [85.24.240.180]) by mail.scandorama.se (Postfix) with ESMTP id 007871C9B2 for ; Mon, 9 Jul 2007 23:27:32 +0200 (CEST) Message-ID: <4692A83F.50208@pmb.mine.nu> Date: Mon, 09 Jul 2007 23:27:27 +0200 From: Peter Petersson User-Agent: Thunderbird 2.0.0.4 (X11/20070618) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: UTF-8 request strings corrupted References: <20070709090321.70307.qmail@web27710.mail.ukl.yahoo.com> In-Reply-To: <20070709090321.70307.qmail@web27710.mail.ukl.yahoo.com> Content-Type: multipart/alternative; boundary="------------020306070007060003000007" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------020306070007060003000007 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit also make sure your database saves things in utf8 all type of things may get messed up if this is not the case there are numerous articles about it, like the ones below http://climbtothestars.org/archives/2004/07/18/converting-mysql-database-contents-to-utf-8/ http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html regards Peter Petersson Xh wrote: > Hi All! > > I have a problem with UTF-8 web pages encoding and Polish language. > > Pages are generated from XML files with XSLT. All Polish characters > are properly displayed. > Everything is OK. > > Response is sent as: > > Server: Apache-Coyote/1.1 > Set-Cookie: JSESSIONID=DCDE41C9E12D69A15B261649CF15DF8E; Path=/DataWeaver > Content-Type: text/html;charset=UTF-8 > ... > > also, the generated XHTML resposne's
element consists: > > > > > but... > > when I fill Polish characters in web form and submit it, all Polish > characters are corrupted... > > for example, inserted records in database are displayed as strange strings > > furthermore, when I extract parameters in this way: > > Map temp = (Map String[]>)request.getParameterMap(); > for (String s: temp.keySet()) { > // output to the console > // this will print every single Polish character as double '?' > System.out.println(s + ": " + temp.get(s)[0]); > } > > any idea how to extract UTF-8 encoded strings from request? > > thanks in advance > best regards > Lukasz > > > ------------------------------------------------------------------------ > Yahoo! Cars > > NEW - sell your car and browse thousands of new and used cars online > search now > > > ------------------------------------------------------------------------ --------------020306070007060003000007 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit also make sure your database saves things in utf8 all type of things may get messed up if this is not the case there are numerous articles about it, like the ones below

http://climbtothestars.org/archives/2004/07/18/converting-mysql-database-contents-to-utf-8/
http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html

regards
  Peter Petersson

Xh wrote:
Hi All!

I have a problem with UTF-8 web pages encoding and Polish language.

Pages are generated from XML files with XSLT. All Polish characters are properly displayed.
Everything is OK.

Response is sent as:

Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=DCDE41C9E12D69A15B261649CF15DF8E; Path=/DataWeaver
Content-Type: text/html;charset=UTF-8
...

also, the generated XHTML resposne's <header> element consists:

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<meta content="pl" http-equiv="Content-Language"/>

but...

when I fill Polish characters in web form and submit it, all Polish characters are corrupted...

for example, inserted records in database are displayed as strange strings

furthermore, when I extract parameters in this way:

Map<String,String[]> temp = (Map<String, String[]>)request.getParameterMap();
for (String s: temp.keySet()) {
      // output to the console
      // this will print every single Polish character as double '?'
      System.out.println(s + ": " + temp.get(s)[0]);
}

any idea how to extract UTF-8 encoded strings from request?

thanks in advance
best regards
Lukasz



Yahoo! Cars NEW - sell your car and browse thousands of new and used cars online search now

--------------020306070007060003000007--