Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2F66D03C for ; Wed, 24 Oct 2012 13:26:19 +0000 (UTC) Received: (qmail 87449 invoked by uid 500); 24 Oct 2012 13:26:19 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 86979 invoked by uid 500); 24 Oct 2012 13:26:14 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 86327 invoked by uid 99); 24 Oct 2012 13:26:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2012 13:26:12 +0000 Date: Wed, 24 Oct 2012 13:26:11 +0000 (UTC) From: "Andrew Grieve (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1578189431.21659.1351085172001.JavaMail.jiratomcat@arcas> In-Reply-To: <579021643.20641.1351062492445.JavaMail.jiratomcat@arcas> Subject: [jira] [Assigned] (CB-1701) FileTransfer response UTF-8 Bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-1701?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Grieve reassigned CB-1701: --------------------------------- Assignee: Andrew Grieve (was: Joe Bowser) =20 > FileTransfer response UTF-8 Bug=20 > -------------------------------- > > Key: CB-1701 > URL: https://issues.apache.org/jira/browse/CB-1701 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 2.1.0 > Environment: Android, Eclipse > Reporter: Paul Poirel > Assignee: Andrew Grieve > Priority: Minor > > I am using the FileTransfer API to upload a picture to a .ashx service (.= NET). > Everything is fine, except that the response (FileUploadResult.response) = is not correctly encoded. It appears like a UTF8 string encoded as ISO. > Here are the logs from Eclipse debug console (LogCat) : > 10-23 00:21:39.580: D/FileTransfer(24513): upload file:///mnt/sdcard/Agor= aStockPictures/740aze1350954367223.jpg to http://*************************/= upload-photo.ashx > 10-23 00:21:39.580: D/FileTransfer(24513): fileKey: fileData > 10-23 00:21:39.580: D/FileTransfer(24513): fileName: 740aze1350954367223.= jpg > 10-23 00:21:39.580: D/FileTransfer(24513): mimeType: image/jpeg > 10-23 00:21:39.580: D/FileTransfer(24513): params: {"lastPicture":true,"i= dproduit":"teststock2224388212","token":"9876543","login":"teststock"} > 10-23 00:21:39.580: D/FileTransfer(24513): trustEveryone: false > 10-23 00:21:39.580: D/FileTransfer(24513): chunkedMode: true > 10-23 00:21:39.580: D/FileTransfer(24513): headers: null > 10-23 00:21:39.580: D/FileTransfer(24513): String Length: 424 > 10-23 00:21:39.580: D/FileTransfer(24513): Content Length: 91341 > 10-23 00:21:40.910: D/FileTransfer(24513): got response from server > 10-23 00:21:40.910: D/FileTransfer(24513): [{"data":{},"errors":{"etat":"= -93","libelle":"L\u0027image existe d=C3=83=C2=A9j=C3=83 ."}}] > 10-23 00:21:40.910: D/FileTransfer(24513): ****** About to return a resul= t from upload > And the result (in an alert or in console.log) is : {"etat":"-93","libel= le":"L'image existe d=C3=83=C2=A9j=C3=83 ."} > The expected result is : {"etat":"-93","libelle":"L'image existe d=C3=A9= j=C3=A0 ."} > When I test the server whith a html form on chrome, I get the correct res= ult. > Plus, the result looks like UTF8 displayed as ISO, so I believe that the = server is sending the UTF8 encoded response, and that it is a client-side i= ssue. > Here are the HTTP headers from the response : > HTTP/1.1 200 OK > Cache-Control: private=20 > Content-Length: 197 > Content-Type: text/plain; charset=3DUTF-8 > Content-Encoding: gzip > Server: Microsoft-IIS/7.5 > X-AspNet-Version: 2.0.50727 > Accepts-Encoding: gzip > Access-Control-Allow-Origin: * > X-Powered-By: ASP.NET > Date: Tue, 23 Oct 2012 10:28:33 GMT > Note : this might be related to the issue #CB-920, which was about the PO= ST params encoding. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira