views:

187

answers:

2

Hi everybody,

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

Do you know what is the problem ??

Thanks a lot !!

A: 

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

brew
A: 

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)