[ALOY-813] Unicode characters display as a text string rather than the character
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-03T17:32:53.000+0000 |
Affected Version/s | Alloy 1.4.0, Alloy 1.2.1 |
Fix Version/s | Alloy 1.3.0, Alloy 1.2.2, 2013 Sprint 18 |
Components | n/a |
Labels | Alloy, qe-testadded, regression |
Reporter | Daniel Sefton |
Assignee | Tim Poulsen |
Created | 2013-08-30T11:13:35.000+0000 |
Updated | 2014-06-04T05:20:03.000+0000 |
Description
I just upgraded to Alloy 1.2.1 and now unicode characters defined in an xml attribute in the alloy view display as a text string rather than the character. I use this technique for icons contained within a custom font file.
Doesn't work (but worked before Alloy upgrade)
<Label id="actionDl" class="actIcon" text="\ue012" right="5dp"/>
Works now
<Label id="actionDl" class="actIcon" right="5dp">\ue012</Label>
Attachments
File | Date | Size |
---|---|---|
androidactual.png | 2014-06-02T11:00:49.000+0000 | 54320 |
iOS_Screenshot.png | 2014-06-02T17:30:23.000+0000 | 26422 |
MobileWeb-Chrome_screenshot.png | 2014-06-02T17:39:17.000+0000 | 11791 |
[~dsefton] did this regression appear between 1.2.0 and 1.2.1?
I'm pretty sure my Alloy was up to date before upgrading to 1.2.1 but I hadn't worked on this app for a week or two so there might have been an Alloy update between the last build and current one. Sorry I can't be more specific.
PR (master): https://github.com/appcelerator/alloy/pull/236 commit (1_2_X): https://github.com/appcelerator/alloy/commit/9d3143fe57f4679fa645d74d94dced6e22a9644f test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-813 Run the test app and ensure that you get a screen that looks like the attached screenshot (from ios). You should see no character escape sequences in the app.
Verified as fixed. Titanium SDK 3.1.3.v20130903160805 Alloy 1.2.X branch Appcelerator Studio 3.1.3.201308302458 CLI 3.1.2.GA Node 0.10.13 Closing.
Reopening the issue as not getting the expected result. Appc-Studio:3.3.0.201405271647 sdk:3.3.0.v20140530163312 acs:1.0.14 alloy:1.4.0-beta npm:1.3.2 titanium:3.3.0-beta2 titanium-code-processor:1.1.1 xcode:5.1.1 Device:iPhone5c(v7.1.1),Nexus7(v4.4.2),Nexus5(v4.4.2),LG-P970(v4.0.4) OS:Maverick(10.9.2) On iOS it is working fine. For Android not getting the expected screenshot. Please refer to attached screenshot.
The \ue012 character appears to not be supported on Android. Try the test case using \u2764 (a heart) instead. It works fine for me. http://www.fileformat.info/info/unicode/char/e012/fontsupport.htm doesn't list Droid Sans or Roboto as supporting the e012 character Perhaps installing this app will help you determine which fonts are supported on your android devices: http://www.madore.org/~david/programs/UnicodeMap.html
Following last Tim's comment, using the suggested unicode \u2764 it works fine on iOS, Android and Mobileweb. TiSDK 3.3.0.v20140603032057 Alloy 1.4.0-beta Appcelerator Studio 3.3.0.201405271647 CLI 3.3.0-beta2 Closing.