开发者

Specific symbol and the Strings file

开发者 https://www.devze.com 2023-02-05 13:25 出处:网络
So I have a symbol: π in the strings file and it turnes out that due to it I cannot successfuly compile to fatal:

So I have a symbol: π in the strings file and it turnes out that due to it I cannot successfuly compile to fatal:

开发者_运维技巧

Copy EN.strings Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 1

If I remove π it's fine. The strange thing is that even if I put π in the comment it still won't compile.

what to do? Thankx


If you can find the Unicode value of the character, you could escape it in the following manor:

NSString *str = @"\u00F6"

And Java (just for comparison):

String str = "\u00F6";

Although I'd imagine that the compile issue relates to the character being from a different encoding to the specified encoding of your source file. I believe the compiler will interpret your source as UTF-8 by default.


Make sure your strings file is using a Unicode encoding, and make sure the string is quoted; this has solved the issue for me in the past.

0

精彩评论

暂无评论...
验证码 换一张
取 消