开发者

Specific symbol and the Strings file

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜