Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 412
Nikolai Nagornyi Avatar asked May 12 '13 04:05

Nikolai Nagornyi


People also ask

Is UTF-16 the same as Unicode?

UTF-16 is an encoding of Unicode in which each character is composed of either one or two 16-bit elements. Unicode was originally designed as a pure 16-bit encoding, aimed at representing all modern scripts.

What is encoding =' UTF-8?

UTF-8 is an encoding system for Unicode. It can translate any Unicode character to a matching unique binary string, and can also translate the binary string back to a Unicode character. This is the meaning of “UTF”, or “Unicode Transformation Format.”

What is difference between Unicode and UTF-8?

The Difference Between Unicode and UTF-8Unicode is a character set. UTF-8 is encoding. Unicode is a list of characters with unique decimal numbers (code points).

How many characters in UTF-8?

UTF-8 is capable of encoding all 1,112,064 valid character code points in Unicode using one to four one-byte (8-bit) code units.


1 Answers

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

like image 144
Martin R Avatar answered Oct 03 '22 19:10

Martin R