Problem
When my app received a UTF-8 text form HTTP Server, the encoding of responseText of Titanium.Network.HTTPClient can be seen invalid.
An ASCII text is OK and for iPhone is OK, but for Android, I cannot guess in which encoding method is the received test.
Workaround
We avoid this problem as like below:
var httpc = Ti.Network.createHTTPClient();
httpc.onload = function() {
var canvases = [];
var lines = "";
if (Ti.Platform.osname == 'iphone') {
lines = this.responseText.split("\n");
} else if (Ti.Platform.osname == 'android') {
lines = ("" + this.responseData).split("\n");
}
Then, my app can get the desired string in variable 'lines'.
As indicated by the reporter in the original title, this ticket relates to android. Hence, correcting Component field.
Explicitly declare the charset on your service's response header, and It will be fixed. I had this very same problem, and It seems that when you don't declare the response charset on the "content-type" header, Android tries to use the current locale of the OS for response texts, which changes from user to user around the world. Set your response header to something like "Content-Type: application/json;charset=utf-8" and your problem will be solved.