incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <>
Subject [Android, iOS] UTF-8 encoding URL for FileTransfer
Date Tue, 17 Jul 2012 20:32:33 GMT
I made a mistake. I didn't realize that Android's FileTransfer does
not do any UTF-8 encoding of the URL and relies on the user encoding
it themselves (default behaviour of

Thus, I'm reverting this change:
(the test case with the Chinese characters there should fail on
Android also, I think)

I tried to see what Android UTF-8 encodes Chinese characters to, but:
... just returns the same string.

I was thinking that maybe we could do encodeURI (in JavaScript) on the
URL passed to FileTransfer, but then that will just add the
restriction that the URL _cannot_ be encoded already (since we don't
want to double encode).

I think the best thing to do is just simply add in the docs that the
dev *must* encode the URL first using encodeURI.


View raw message