Localization.strings in UTF16 vs UTF8
Anyone know of any reasonable explanation why for Cocoa localization
files need to be in UTF16?
Is this just to make using SCMs painful? Or what is wrong with using UTF-8?
Anyone filed a radar for this yet? At least I didn't find anything over at
On 15 dec 2009, at 07.47, Torsten Curdt wrote:
> Anyone know of any reasonable explanation why for Cocoa localization
> files need to be in UTF16?
I think that this is simply a documentation bug. Cocoa expects, or at least expected, strings files in the product to be UTF16. For that reason, the recommendation was for you to maintain your strings files as UTF16. Recent versions of Xcode (both 3.1.x and 3.2.x) will convert your strings files to UTF16 automatically as they are copied over to the build product, allowing you to maintain the "source" version of the strings file in the more manageable UTF8.
It's easy to change the encoding of your strings files by using the file inspector in Xcode. You'll also find that when you create new projects / files in Xcode, strings files are provided as UTF8 out of the box.
You can find snippets of information about this in the Xcode release notes:
Please file a bug report on any documentation that you find that isn't updated:
j o a r
This topic came up during yesterdays CocoaHeads and there was quite
some confusion around this. Many thanks for the the clarification,