[TIMOB-1622] UnicodeEncodeError on build
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | defect, ios, iphone, rplist, tiapp, unicode |
Reporter | netspy |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:57:36.000+0000 |
Updated | 2011-04-17T01:56:41.000+0000 |
Description
My iphone app fails to build when I include Unicode characters in the project description field. This is the content of the tiapp.xml:
<description>Deutsche Grammatik einfach, kompakt und
übersichtlich</description>
If I performing a full rebuild (empty the build/iphone folder), I get this error in build.log:
Exception detected in script:
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/builder.py", line 612, in main
compiler = Compiler(project_dir,appid,name,deploytype,xcode_build,devicefamily,iphone_version,True)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/compiler.py", line 152, in __init__
main_file.write(main_template)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 638: ordinal not in range(128)
If I change the description field to ascii only, it works fine.
Titanium Developer 1.2.1
Mobile SDK 1.4
Mac OS X
Xcode 3.2.3
iOS SDK 4.0.2
Comments
- netspy 2011-04-15
There are also UnicodeErrors, if the name field contains unicode characters like German umlauts:
<name>Sprachführer Deutsch-Englisch</name>
Steps to reproduce
- Create new mobile Project
- Give project name: „Sprachführer
Deutsch-Englisch“
- Run project in iPhone emulator
Result
Output in Titanium console is:
[INFO] Compiling JavaScript...one moment [INFO] No JavaScript errors detected. [INFO] One moment, building ... [INFO] Titanium SDK version: 1.4 [INFO] iPhone Device family: iphone [INFO] iPhone SDK version: 4.0
No emulator starts. In build.log there is this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 638: ordinal not in range(128)
- Create new mobile Project
- Don Thorp 2011-04-15
#33 was marked resolved but seems to be occurring in 1.4.X
- Jeff Haynie 2011-04-15
(from [ac324fd512d02b2d766742b8a0704b39514c2983]) [#1622 state:fixed-in-qa] Titanium build system now supports project names and information containing UTF-8 unicode. http://github.com/appcelerator/titanium_mobile/commit/ac324fd512d02b2d766742b8a0704b39514c2983"> http://github.com/appcelerator/titanium_mobile/commit/ac324fd512d02...
- Stephen Tramer 2011-04-15
Will push to 1_4_X when fix confirmed. Note that this issue may persist for android and modules.
- Stephen Tramer 2011-04-15
Doesn't affect Android build process; does appear to affect modules. Seems to be related to how we create xcode projects.
- Thomas Huelbert 2011-04-15
iPod 4th gen (4.1), 3rd gen 4.0.2 with mobile sdk build 1.5.0.62c1cae