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!
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.
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.”
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).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With