Xcode warning: The specified input encoding is Unicode (UTF-8), but file contents appear to be Unicode (UTF-16); treating as Unicode (UTF-16)

StackOverflow https://stackoverflow.com/questions/16504272

سؤال

I create the .strings file by using genstrings command. Output file of this command encoded with UTF-16, but when i add generated .strings file to my project and then bild, Xcode show warning:

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

I open .strings file in textEdit.app and resave it with UTF-16, but this haven't effect.

Hot to fix this? Thaks!

هل كانت مفيدة؟

المحلول

I could not reproduce the problem, but the easiest solution is probably to select the strings file in Xcode and set the "Text Encoding" to "UTF-16" in the File inspector.

enter image description here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top