Xcode warning: the specified input encoding is Unicode (UTF-8), but the contents of the file look like Unicode (UTF-16); considering as Unicode (UTF-16)

I am creating a .strings file using the genstrings . The output file of this command is encoded using UTF-16, but when I add the generated .strings file to my project and then bild, Xcode shows a warning:

The specified input encoding is Unicode (UTF-8), but the contents of the file appear to be Unicode (UTF-16); considering as Unicode (UTF-16).

I open the .strings file in textEdit.app and save it using UTF-16, but this does not affect.

Hot to fix it? Thaks!

+6
source share
1 answer

I could not reproduce the problem, but the simplest solution is probably to select the string file in Xcode and set the Text Encoding to UTF-16 in the File Inspector.

enter image description here

+13
source

Source: https://habr.com/ru/post/944803/


All Articles