Re: Unable to write in InfoPlist.strings file from cpp
Re: Unable to write in InfoPlist.strings file from cpp
- Subject: Re: Unable to write in InfoPlist.strings file from cpp
- From: Greg Parker <email@hidden>
- Date: Tue, 8 Dec 2009 06:48:44 -0800
On Dec 8, 2009, at 5:25 AM, Parimal Das wrote:
> I am trying to write "CFBundleGetInfoString" into "InfoPlist.strings" from
> cpp code and It is writing successfully.
> But when i use the InfoPlist.strings in xcode, it gives me a build error
> /usr/bin/iconv: English.lproj/InfoPlist.strings:1:82: incomplete character
> or shift sequence
>
> Now if i open the .strings file in dashcode (or any other text editor), it
> shows me the required text correctly, but when i open the same in xcode - it
> show something similar to chinese/japanese script.
>
> Dashcode shows: CFBundleGetInfoString = "bla bla bla";
> Xcode shows: 屲屮䍆䉵湤汥䝥瑉湦潓瑲楮朠㴠≍慩求牯睳敲′⸳⁐䕎呁Ⱐ䍯
Xcode is probably reading InfoPlist.strings with the wrong text encoding. Most likely, your code wrote UTF-8 that Xcode is reading as UTF-16.
Open your project in Xcode, Get Info on each InfoPlist.strings file, and set General > File Encoding to the encoding your code writes. When Xcode asks what to do with the existing file, choose Reinterpret.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden