Git: Non-ASCII characters in user.name get garbled in commits

Originator:minh
Number:rdar://22423173 Date Originated:25-Aug-2015
Status:Closed Resolved:09-Sep-2015
Product:Developer Tools Product Version:
Classification:Other Bug Reproducible:Always
 
Summary:
I have a local Git working copy with my `user.name` set to “Minh Nguyễn”. Starting in Xcode 7 beta 6, committing in that repository produces commits with the following author metadata:

Author: Minh Nguy·ªÖn <mxn@example.org>

whereas in earlier betas and earlier versions of Xcode, the non-ASCII character in my name was preserved:

Author: Minh Nguyễn <mxn@example.org>

It appears that Xcode is interpreting the string in MacRoman encoding somewhere along the line. Please ensure that you’re using NSUTF8StringEncoding everywhere you possibly can.

Steps to Reproduce:
1. `git config set user.name 'Minh Nguyễn'`
2. Commit something inside Xcode.
3. `git log -n 1 --format='%an'`

Expected Results:
Minh Nguyễn

Actual Results:
Minh Nguy·ªÖn

Version:
Xcode 7.0 beta 6 (7A192o)
OS X 10.10.5 (14F27)

Notes:

Configuration:
Presumably also reproduces with emoji. 😏

Attachments:

Comments

I submitted a duplicate of this bug, and it appears your original bug has been closed by Apple. Did they mention if they would resolve it? Issue is still present on Xcode 7.0, I hope it's fixed on 7.1.

It is fixed in Xcode 7.1. :-D


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!