Xcode 4.6.2: unicode not supported in project file
| Originator: | wangjammer5 | ||
| Number: | rdar://13827044 | Date Originated: | 07-May-2013 04:13 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 4.6.2 (4H1003) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
Unicode is not correctly supported in the project file. If you set a build variable to something that e.g. includes Emoji, all appears to work fine. That is until you exit Xcode and attempt to reload the project.
Steps to Reproduce:
1. Create an iOS project
2. Define a custom build variable, say MY_PRODUCT_NAME
3. Define a value for the variable MY_PRODUCT_NAME including obscure unicode chars, more obviously emoji such as the "Skull" 💀
4. Set your bundle name to ${MY_PRODUCT_NAME}
5. Run the app in simulator, go to Home screen
6. Notice emoji works in icon title of application in springboard
7. Quit Xcode
8. Attempt to re-open project. Should fail to open the project.
Also running plutil -line on the project.pbxproj fails with an obscure error about line 1 of the file. Notice also that the pbxproj file states at the top of it: // !$*UTF8*$! … and yet this seems to not be implemented correctly.
This leads to very obscure failures that can be really hard to debug if the variable was added to the project along with a bunch of other non-trivial changes. I nearly cried, but hey now I understand more about the legacy NSDictionary serialisation format.
Expected Results:
Re-opening the project should work, as Xcode was entirely happy with the project until it was exited.
Actual Results:
Xcode fails to load the project without explaining why.
Regression:
N/A
Notes:
Before you dismiss this as a silly prank to include Emoji in app names, it is very useful… e.g. I use the Under Construction icon for beta builds of the app. Well I did, until this all went horribly wrong.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Correction of typo
The tool "plutil -lint" is used to check the file, not -line as originally stated