[TIMOB-1672] Android: XHR to XML (responseXML) does not respect encoding
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T02:59:01.000+0000 |
Updated | 2011-04-17T01:56:49.000+0000 |
Description
Customer uses a feed service which provides xml in ISO-8859-1.
The xml processing instruction accurately reflects that the
charset=ISO-8859-1. Our HTTPClient.responseText
also
accurately determines the charset, but
HTTPClient.responseXML
just hands off the string to
XMLModule.parse
without telling it what the encoding
is.
In the customer's specific case, this meant that umlauts (e.g., ö) and accented characters (e.g., é) were screwed up when displayed on the android (or emulator) screen.
Screenshot of problem:
http://skitch.com/billdawson/dwk1r/5560-titanium-5-hvga">http://skitch.com/billdawson/dwk1r/5560-titanium-5-hvga
Attachments
File | Date | Size |
---|---|---|
emulator.png | 2011-04-15T02:59:01.000+0000 | 119408 |
remotefile.js | 2011-04-15T02:59:02.000+0000 | 6789 |
titanium.png | 2011-04-15T02:59:01.000+0000 | 148157 |
Test case (see me via e-mail for the URL for
xhr.open()
-- it's not to be made public).Screenshot when fixed:
http://skitch.com/billdawson/dwk16/5560-titanium-5-hvga">http://skitch.com/billdawson/dwk16/5560-titanium-5-hvga
(from [5a5703997aa24b161599439e25ca4c5fce0f3e80]) [#1672 state:fixed-in-qa] XHR now respects encoding when passing string to XMLModule.parse for responseXML http://github.com/appcelerator/titanium_mobile/commit/5a5703997aa24b161599439e25ca4c5fce0f3e80"> http://github.com/appcelerator/titanium_mobile/commit/5a5703997aa24...
Actually you can get the feed address from the problem description in helpdesk ticket 38891.
Hey Bill,
thanks a lot for your help again. I have attached 2 screenshots bcs im still having the "umlaut" issue. And im using the build from your continous build server.
Maybe its because im downloading the file and save it into another file. I have also attached the js file which handles the downloading and saving of the file. And im using responseData instead of responseXML.
Best regards, Marco
Here is the remoteFile.js File
Hi Marco,
Please add to your helpdesk ticket instead of here. The issue described by the title of this lighthouse ticket really is resolved, so we should carry on with other problems (i.e., going through a file) via helpdesk.
thank you,
Bill
confirmed