Xcode 10 Beta 4 CopyStrings --inputencoding utf-8 When File is utf-16

Just tried to build my project with the latest Xcode 10, Beta 4, and I'm getting CopyStrings failures. Xcode passes --inputencoding utf-8 for some reason whiltemy strings files have always been in utf-16. I tried converting them to utf-8 but the Xcode passes --inputencoding utf-16 for some of them. I can't seem to fully please Xcode 10 beta 4 no matter what encoding I use. Does anyone have a solution to this? I didn't find anywhere in Xcode in my project to specify the encoding of my strings files. Seems like Xcode should be able to automatically detect the encoding. I tried the usual clean build, option clean build and I even deleted the folder under DerivedData.

Replies

Same here when upgrading from beta 3 to beta 4.


Temporarily I fixed it using iconv because it looks like it is forcing UTF-8 and the editor keeps it as UTF-16.


cp Localizable.strings Localizable.strings.backup

iconv -f utf-16 -t utf-8 Localizable.strings.backup > Localizable.strings


But it looks like an Xcode/build system bug that should be fixed shortly.

+1


I have the same issue.