Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-33] Via Tender: Unicode error with tiapp.xml

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:50:10.000+0000
Affected Version/sn/a
Fix Version/sBacklog
ComponentsiOS
Labelsn/a
ReporterJeff Haynie
AssigneeReggie Seagraves
Created2011-04-15T02:22:44.000+0000
Updated2012-10-02T03:10:25.000+0000

Description

Assigned to http://support.appcelerator.net/discussions/support/60-unicode-error-with-tiappxml"> Tender issue #60. As reported in Tender:

My app fails to build when I include a Unicode character in tiapp.xml.

Here's a fragment of my XML:

    <window>
        <id>suite</id>
        <icon>suite_button.png</icon>
        <title>Have2…</title>

The word "Have2" is followed by the Unicode ellipsis character. The build error is

Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/0.4.2/iphone/builder.py", line 309, in
main(sys.argv)
File "/Library/Application Support/Titanium/mobilesdk/osx/0.4.2/iphone/builder.py", line 166, in main
add_plist(os.path.join(iphone_dir,'Resources'))
File "/Library/Application Support/Titanium/mobilesdk/osx/0.4.2/iphone/builder.py", line 140, in add_plist
ti = TiAppXML(tiapp_xml)
File "/Library/Application Support/Titanium/mobilesdk/osx/0.4.2/iphone/../tiapp.py", line 64, in __init__
wp = get_window_properties(window)
File "/Library/Application Support/Titanium/mobilesdk/osx/0.4.2/iphone/../tiapp.py", line 35, in get_window_properties
wp[w.nodeName]=getText(w.childNodes)
File "/Library/Application Support/Titanium/mobilesdk/osx/0.4.2/iphone/../tiapp.py", line 13, in getText
return str(rc)
UnicodeEncodeError: 'ascii' codec can't encode character u'…' in position 5: ordinal not in range(128)

The problem was worked around by changing the ellipsis to three periods.

Comments

  1. Jeff Haynie 2011-04-15

    this should be fixed in 0.8, need to retest this specific case

  2. netspy 2011-04-15

    The bug is in SDK 1.4 still recent!

JSON Source