The Safari .strings files not "in binary" AFAICT. They appear to be text files (you can view them in TextEdit) in UTF-16 rather than UTF-8. How did you decide they were "in binary"?
There are some .string files that I cannot read in a text editor...until I convert them with plutil into XML format.....
they appear to be in the binary property list format...that's how I decided
If you read carefully here:
you'll see that you're supposed to create .strings files as text files (currently UTF-8 preferred, but UTF-16 was preferred in the past), but that the text file is a plist representation (the other representations being binary and XML). You may well be able to use a binary plist in your project directly, or to add a plist-conversion phase to your target, but it's not clear what's truly supported.
It's also possible that Apple reserves the binary plist form of .strings for its own use.
It ought to be possible, in current versions of Xcode, to never create .strings files manually at all, but let Xcode extract the localizable strings from your source code. AFAIK, it can do this both for Swift and Obj-C, without your needing to run genstrings any more. In that case, you can limit your profane comments to your source code, and your users will be safe.
Check out the Strings file Output Encoding build setting (
STRINGS_FILE_OUTPUT_ENCODING). It defaults to
binaryfor iOS projects and
UTF-16for macOS ones.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
That's what I was looking for. Thanks!