Xcode 6.4: Viewing comparison editor for .strings files shows garbage for unedited version

Originator:rsattar
Number:rdar://21826595 Date Originated:14-Jul-2015 05:43 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.4 (6E35b)
Classification:Other Bug Reproducible:Always
 
Summary:
I used ‘ibtool [name_of_xib].xib --generate-strings-file /path/to/existing/[name_of_xib].strings’ and tried to view the changes in Xcode’s comparison viewer.

Steps to Reproduce:
0) Create an Xcode project with either a storyboard or xib, and place it under version control
1) For the .xib, under inspector, ensure that you have pressed “Localize…” to bring the .xib under Base.lproj
2) Add a .strings file to an internationalized xib by selecting a language (let’s say English). This generates a [name_of_xib].strings under en.lproj
3) Go back to the .xib in IB, and change one of the strings to a different value
4) Open Terminal.app and navigate to the location of the .xib you just modified
5) Run ‘ibtool [name_of_xib].xib --generate-strings-file ../en.lproj/[name_of_xib].strings’
6) Back in Xcode look at the modified .strings file
7) Open the comparison editor to see the changes

Expected Results:
The comparison editor will show the changed string from the xib.

Actual Results:
The “previous” editor shows garbage (chinese characters for me), rather than the original .strings (see attachment)

Notes:
Perhaps this is related to UTF-8 or UTF-16 parsing? IIRC .strings files are supposed to be in UTF-16 format.

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!