I tried changing the encoding and line endings for .swift and .m files in my project — from LF to CRLF, and from UTF-8 to UTF-16. I wanted to use the ‘Text Encoding’ and ‘Line Endings’ attributes in Xcode’s Identity Inspector → Text Attributes section.
But it looks like these features are broken: Xcode doesn’t correctly detect the current encoding or line endings, and saving the file doesn’t apply the selected values.
I also tried changing the default values in Xcode’s settings, but that had no effect either.
I checked the behavior across Swift, Objective-C, and C/C++ files.
Are Xcode’s Text Encoding and Line Endings features broken? If so, how long has this issue existed, and is there a radar or feedback report for it?
If they’re not broken, how are we supposed to use them?