incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon MacDonald (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-920) FileTransfer UTF-8 bug
Date Thu, 14 Jun 2012 14:37:43 GMT

     [ https://issues.apache.org/jira/browse/CB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Simon MacDonald resolved CB-920.
--------------------------------

    Resolution: Fixed

At some point the writing of the parameter was changed from writing the raw bytes to writing
the string. This causes problems for UTF-8 strings. I switched it so that it would go back
to writing the raw bytes based on UTF-8 encoding.
                
> FileTransfer UTF-8 bug
> ----------------------
>
>                 Key: CB-920
>                 URL: https://issues.apache.org/jira/browse/CB-920
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1
>            Reporter: Simon MacDonald
>            Assignee: Simon MacDonald
>             Fix For: 1.9.0
>
>
> Below is my code:
> ********************
> var options = new FileUploadOptions();
> options.fileKey="PhotoData";
> options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
> options.mimeType="image/jpeg";
> var params = new Object();
> params.D1 = "UTF-8 DATA";  // UTF-8 Chinese here
> params.D2 = "ABCD1234";
> options.params = params;
> var ft = new FileTransfer();
> ft.upload(imageURI, "http://1.2.3.4/CGI/", win, fail, options);
> ************************
> Before 1.6.0 version(1.5.0, 1.4.1 ...) is OK, 1.6.0 ~ 1.8.1 can't get
> UTF-8 parameter, 3 UTF-8 char only return 3 bytes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message