Re: Question on STRINGS_FILE_OUTPUT_ENCODING
Re: Question on STRINGS_FILE_OUTPUT_ENCODING
- Subject: Re: Question on STRINGS_FILE_OUTPUT_ENCODING
- From: Joar Wingfors <email@hidden>
- Date: Wed, 10 Nov 2010 08:09:25 -0800
On 10 nov 2010, at 05.49, Ulf Dunkel wrote:
> I wonder why our apps work fine with UTF-8 built .strings files? ;-)
Perhaps Mac OS X tries UTF-8 as a fallback?
I think this comes down to the simple fact that plain text files doesn't carry any metadata that allows the consumer to know which encoding to use when reading in the file. In some specific cases the encoding can be detected by looking at the data in the file, but that is an exception, and not the common case. Sure, UTF-8 is also a perfectly reasonable encoding for strings files, but if a specific encoding is not declared to be the correct encoding to use for strings files, what's to stop someone from deciding that they'd rather use Mac Roman, Latin-1 or any other commonly used encoding? It is not reasonable to have a scenario when Mac OS X is expected to guess / sniff / detect the used encoding. UTF-8 is a fine choice, but so is UTF-16. Had the decision been made today I would think that the choice would have been UTF-8 simply because it's so common. Back when this decision was made, probably long before the introduction of Mac OS X, there might have been other considerations that factored into the choice of encoding.
That's about as far as I would want to get into guessing on this topic... ;-)
If you'd like to see something change wrt. this, I'd suggest you file a bug report / feature request with the Apple Bug Reporter.
j o a r
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden