[TIMOB-3080] Android: Deploy Corrupts UTF-8 Characters
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-10 |
Components | Android |
Labels | android, defect, release-1.6.1, release-1.7.0, reported-1.6.0, rplist |
Reporter | Dawson Toth |
Assignee | Don Thorp |
Created | 2011-04-15T03:36:18.000+0000 |
Updated | 2011-04-17T02:00:51.000+0000 |
Description
Problem
UTF-8 characters in JavaScript get corrupted by the Android deployment build scripts in Titanium.
Sample Project
- Run the attached project in the emulator. It is based on the
default, two tab project. The only difference is the labels have
UTF-8 characters in them. Notice there is an Umlaut above the
"ö" in "Min förbrukning".
- Create an apk of the project by using the "Distribute" >
"Android" tab. If you run this APK on the device, you'll notice the
UTF-8 characters are now corrupt.
- Without cleaning the build, run the project in the emulator. The UTF-8 characters should be messed up here as well. On my machine, the O with Umlaut was replaced with a check mark (√).
Tested On
Titanium SDK version: 1.6.0 (02/02/11 15:22 a02f7db...)
Android Emulator 2.2
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/70681">http://developer.appcelerator.com/helpdesk/view/70681
Attachments
File | Date | Size |
---|---|---|
utf8test.zip | 2011-04-15T03:36:19.000+0000 | 4766874 |
It would help if I attached the project...
We have experienced this exact same issue today when we were about to release an application just updated to 1.5.1 to QA and (soon) the Marketplace. This issue is critical to us. If someone can point us to a place to look we will help out :)
2nd Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/76272">http://developer.appcelerator.com/helpdesk/view/76272
This 3rd customer actually has a patch for the build scripts, provided in the ticket:
3rd Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/76261">http://developer.appcelerator.com/helpdesk/view/76261
We have the same problem.
Encoding works on simulator an with "Run on Device".
As soon as we compile an apk for distribution all UTF-8 Characters are corrupted.
This starts from version 1.5.x on.
As lon as we use 1.4.x it works.
I noticed when I use the optional folder /platform/android/AndroidManifest.xml for a custom Manifest during compilation an additional AndroidManifest.xml.gen is created under /build/android/. This file is not identical with the custom one. Especially the header and the permissiona are different.
This is a big problem for all countries using special characters (Germany, France, Spain etc.) as you cannot use Titanium anymore for compiling apps for distribution.
We would use 1.4.x but lot of code designed for 1.5-x won´t work.
Any workarounds in sight?
Also it seems that the problem exists on OS-X and Windows 7 likewise.
(from [6d9b0f3e05ba71621da82c4ca98f4d5d1b250705]) force utf8 encoding in the js compiler, correctly deal with an absolute prefix on an app:// URL for compiled JS, matching up with the behavior
in interpreted mode [#3312 state:fixed-in-qa] [#3080 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/6d9b0f3e05ba71621da82c4ca98f4d5d1b250705"> https://github.com/appcelerator/titanium_mobile/commit/6d9b0f3e05ba...
(from [89c196d407d96d587e0c7883d6670e6523ff52c3]) force utf8 encoding in the js compiler, correctly deal with an absolute prefix on an app:// URL for compiled JS, matching up with the behavior
in interpreted mode [#3312 state:fixed-in-qa] [#3080 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/89c196d407d96d587e0c7883d6670e6523ff52c3"> https://github.com/appcelerator/titanium_mobile/commit/89c196d407d9...
Tested with Titanium SDK version: 1.6.1 (03/10/11 13:25 2e8c438...) on
Emulator 2.1
Samsung Galaxy 2.2 (Tested with distribution package)
Tested with Titanium SDK version: 1.7.0 (03/11/11 12:08 86cfe14) on
Emulator 2.1
Samsung Galaxy 2.2 (Tested with distribution package)
(from [727a5e1d7bc90e0c26ee528075f4648fe6fa14e7]) force utf8 encoding in the js compiler, correctly deal with an absolute prefix on an app:// URL for compiled JS, matching up with the behavior
in interpreted mode [#3312 state:fixed-in-qa] [#3080 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/727a5e1d7bc90e0c26ee528075f4648fe6fa14e7"> https://github.com/appcelerator/titanium_mobile/commit/727a5e1d7bc9...
Cherry-pick changed the state. Reversing that change.