#!/usr/bin/env python import sys data = open(sys.argv[-1]).read() ascii = data.decode('utf-16').encode('ascii', 'replace') sys.stdout.write(ascii)Shell:
$ echo "*.strings diff=xcode_strings" >> .gitattributes $ git config diff.xcode_strings.textconv /path/to/utf16_to_ascii.py