Closed Mad-Thanos closed 5 years ago
There seemed to be a garbled string in the script as well: https://github.com/sean-parent/tools/blob/2e70670e50385f8ef1b6089a68f2688994ce0b57/xcode-clang-format.applescript#L72
I believe the script should now handle utf-8 text correctly in source files. The script file itself is in MacRoman encoding (script files have an "odd" relationship to utf-8 - making the changes to support utf-8 encoding in source files added some additional non-unicode characters. Unfortunate, but I'm not aware of a fix.
To reproduce this issue, you can try to reformat the following code snippet:
In my xcode(10.3 on Mojave 10.14.6), the chinese string "检测不到人脸", will turn into "妫ü娴涓�颁汉��" after reformatted, namely a garbled string.
Could you please help?