Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 94680 invoked from network); 13 Feb 2009 23:29:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 23:29:22 -0000 Received: (qmail 33881 invoked by uid 500); 13 Feb 2009 23:29:21 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 33864 invoked by uid 500); 13 Feb 2009 23:29:21 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 33855 invoked by uid 99); 13 Feb 2009 23:29:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 15:29:21 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 23:29:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 94B2C234C48C for ; Fri, 13 Feb 2009 15:28:59 -0800 (PST) Message-ID: <286633254.1234567739608.JavaMail.jira@brutus> Date: Fri, 13 Feb 2009 15:28:59 -0800 (PST) From: "nadir amra (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Commented: (AXISCPP-964) SOAP request/response not UTF-8 encoded (but claims to be) In-Reply-To: <25731551.1145646545879.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXISCPP-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673419#action_12673419 ] nadir amra commented on AXISCPP-964: ------------------------------------ The other option is to have user put character set in config file (i.e. 'ISO-8859-1'), unless it can be obtained from locale? > SOAP request/response not UTF-8 encoded (but claims to be) > ---------------------------------------------------------- > > Key: AXISCPP-964 > URL: https://issues.apache.org/jira/browse/AXISCPP-964 > Project: Axis-C++ > Issue Type: Bug > Components: SOAP > Affects Versions: current (nightly) > Environment: All platforms, except OS/400 > Reporter: Henrik Nordberg > > (See the end of this description for a one-liner that works around this problem for most cases.) > SoapSerializer.cpp, line 379 says > serialize( "", NULL); > that is that the SOAP response is UTF-8 encoded. But this is only true for OS/400 as can be seen in HTTPTransport.cpp, lines 311- > #ifndef __OS400__ > *m_pActiveChannel << this->getHTTPHeaders (); > *m_pActiveChannel << this->m_strBytesToSend.c_str (); > #else > // Ebcdic (OS/400) systems need to convert the data to UTF-8. Note that free() is > // correctly used and should not be changed to delete(). > const char *buf = this->getHTTPHeaders (); > utf8Buf = toUTF8((char *)buf, strlen(buf)+1); > *m_pActiveChannel << utf8Buf; > free(utf8Buf); > utf8Buf = NULL; > utf8Buf = toUTF8((char *)this->m_strBytesToSend.c_str(), this->m_strBytesToSend.length()+1); > *m_pActiveChannel << utf8Buf; > free(utf8Buf); > utf8Buf = NULL; > #endif > This leads to clients trying to decode the response as UTF-8, and will have errors whenever the response contains non-ASCII characters (i.e., > 127). > Axis Java, for example, will prduce this error upon decoding: > "java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence." > A simple workaround is to change SoapSerializer.cpp, line 379: > from > serialize( "", NULL); > to > serialize( "", NULL); > The real fix, however, is to encode the response with UTF-8 for all platforms (not just OS/400). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.