Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-920

FileTransfer UTF-8 bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1
    • 1.9.0
    • cordova-android
    • None

    Description

      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.

      Attachments

        Activity

          People

            macdonst Simon MacDonald
            macdonst Simon MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: