문제

I use a Localizable.strings file and replaces the strings in my app with NSLocalizedString(@"KEY",@" COMMENT").

I replaced up to now a lot of strings and it worked well. I have added some more strings and now I have got the following error message :

CopyStringsFile build/Debug-iphoneos/Australia.app/en.lproj/Localizable.strings en.lproj/Localizable.strings cd /Users/regisandre/Desktop/XCode/AUSTRALIAENINT setenv ICONV /usr/bin/iconv setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings --validate --inputencoding utf-8 --outputencoding binary en.lproj/Localizable.strings --outdir /Users/regisandre/Desktop/XCode/AUSTRALIAENINT/build/Debug-iphoneos/Australia.app/en.lproj en.lproj/Localizable.strings: Conversion of string failed. The string is empty. en.lproj/Localizable.strings: Conversion of string failed. The string is empty. Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 1

Update:

You are right ! It was a question of UTF-8/UTF-16 encoding. Once the file generated with genstrings, it is necessary to avoid copy/paste in the strings file from other files (even from Xcode) as it induces some encoding issues.

Once the file generated with Xcode, all the modifications have to be done directly in the file by "direct typing with the keayboard" ; no copy/paste ! (except if you are sure that the format you copy/paste is correct but it seems not so easy to know)

도움이 되었습니까?

해결책

Check if it's UTF-8 encoding when it has special symbols in it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top