Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 96226 invoked from network); 23 Oct 2008 09:38:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Oct 2008 09:38:19 -0000 Received: (qmail 77098 invoked by uid 500); 23 Oct 2008 09:38:20 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 77072 invoked by uid 500); 23 Oct 2008 09:38:20 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 77061 invoked by uid 99); 23 Oct 2008 09:38:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Oct 2008 02:38:20 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [87.248.114.92] (HELO web24005.mail.ird.yahoo.com) (87.248.114.92) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 23 Oct 2008 09:37:10 +0000 Received: (qmail 6395 invoked by uid 60001); 23 Oct 2008 09:36:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=2AQ+KWPVtlT7lEACqgIgt05vfxF8JCNx4jelWIoNTFMYfqD/0oWEqSqHcgJP/kikC/r2Ztu3ENTmk6iNPScIcOjU9nO12jsbbCk+YEGegWA9aH+jEARJgktqpU6YJeYDFrr8+glSdwTlEuzGHxRUG0Hw5Zc51ILZ2DuHV6f0RYE=; X-YMail-OSG: LHcx4KgVM1ksRoiEP3n31WPZlP8DWCBA_tVVwr2NrFfh4r6VcDDD5AHoftxa8gEpxjQ_Bg6UML2iXOALSlBoy1CFmDS3FaF7RpTZbQ.XXvbPoNeVe_XOlCHzUQs2WjNtEQKg8Vz8D6bABZQ31K3qGuhydZcDpjdxCNphlmislz7TVRH7kbM- Received: from [195.224.168.34] by web24005.mail.ird.yahoo.com via HTTP; Thu, 23 Oct 2008 09:36:47 GMT X-Mailer: YahooMailRC/1155.11 YahooMailWebService/0.7.247.3 Date: Thu, 23 Oct 2008 09:36:47 +0000 (GMT) From: Mike Kyle Subject: UTF8 problem? To: httpclient-users@hc.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-912371670-1224754607=:6161" Message-ID: <74432.6161.qm@web24005.mail.ird.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-912371670-1224754607=:6161 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I set an EntityEnclosingMethod request entity to be a ByteArrayRequestEntit= y. This entity has the Java characters "\u4E2D\u6587" as the corresponding = UTF8 bytes (UTF8 =3D 0xE4,0xB8,0xAD,0xE6,0x96,0x87). This is confirmed by l= ogging httpclient.wire.content. There I see the UTF8 values.=0A=0AHowever w= hat appears to really get transmitted is the corresponding Java characters = rather than the UTF8 values! As this is supposedly a UTF8 encoded XML docum= ent the receiver is not best pleased. This is confirmed by performing HTTP = sniffing using org.apache.axis.utils.tcpmon.My suspicion is that somehow a = character handler is intervening? =0A=0ADebugging HttpConnection implied th= at the output stream is a BufferedOutputStream wrapping a java.net.SocketOu= tputStream. I had assumed that the socket streams would be byte oriented. T= he content type is set to 'text/xml; chartset=3D"utf-8"'.=0A=0AI am normall= y using HttpClient 3.0 + but the latest 3.1 appeared to react exactly the s= ame.=0A=0A=0A=0A --0-912371670-1224754607=:6161--