Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Manfred Schwind
 Be careful, though: Some MacOS versions have a bug where .strings files had 
 to be UTF16 to actually work. I don't think Apple has fixed that yet.

Do you have more specific information about that?
I consequently always used UTF-8 for all my .strings files in every project I 
ever worked on (for many years; I think I started with 10.1 or so) and never 
had a single problem with that.
What exactly does not work when not using UTF-16?
Maybe UTF-16 and UTF-8 both work, but - of course - no other encoding like ISO 
Latin or Mac Roman etc.?

Regards,
Mani
--
http://mani.de - friendly software

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Henry McGilton (Boulevardier)

On Dec 10, 2009, at 8:42 AM, Manfred Schwind wrote:

 Be careful, though: Some MacOS versions have a bug where .strings files had 
 to be UTF16 to actually work. I don't think Apple has fixed that yet.
 
 Do you have more specific information about that?
 I consequently always used UTF-8 for all my .strings files in every project I 
 ever worked on (for many years; I think I started with 10.1 or so) and never 
 had a single problem with that.
 What exactly does not work when not using UTF-16?
 Maybe UTF-16 and UTF-8 both work, but - of course - no other encoding like 
 ISO Latin or Mac Roman etc.?


There is a very much in passing comment in  'Internationalising Programming 
Topics'  guide for Cocoa.

Note: It is recommended that you save strings files using the UTF-16 
encoding,
which is the default encoding for standard strings files. It is 
possible to create strings
files using other property-list formats, including binary property-list 
formats and XML
formats that use the UTF-8 encoding, but doing so is not recommended . 
. .

Cheers,
. . . . . . . .Henry

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Manfred Schwind
 Be careful, though: Some MacOS versions have a bug where .strings files had 
 to be UTF16 to actually work. I don't think Apple has fixed that yet.
 
 Do you have more specific information about that?
 I consequently always used UTF-8 for all my .strings files in every project 
 I ever worked on (for many years; I think I started with 10.1 or so) and 
 never had a single problem with that.
 What exactly does not work when not using UTF-16?
 Maybe UTF-16 and UTF-8 both work, but - of course - no other encoding like 
 ISO Latin or Mac Roman etc.?
 
 There is a very much in passing comment in  'Internationalising Programming 
 Topics'  guide for Cocoa.
 
 Note: It is recommended that you save strings files using the UTF-16 
 encoding,
 which is the default encoding for standard strings files. It is 
 possible to create strings
 files using other property-list formats, including binary 
 property-list formats and XML
 formats that use the UTF-8 encoding, but doing so is not recommended 
 . . .

Ah - wait! I am using UTF-8 for the files in the Xcode Project. This makes it 
much easier to handle them in SCM systems etc. But Xcode automatically converts 
the strings files into UTF-16 when copying them into the final App bundle. I'm 
not sure this was always the case, though.

Regards,
Mani
--
http://mani.de - friendly software

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Douglas Davidson


On Dec 10, 2009, at 8:42 AM, Manfred Schwind wrote:

Be careful, though: Some MacOS versions have a bug where .strings  
files had to be UTF16 to actually work. I don't think Apple has  
fixed that yet.


Do you have more specific information about that?
I consequently always used UTF-8 for all my .strings files in every  
project I ever worked on (for many years; I think I started with  
10.1 or so) and never had a single problem with that.

What exactly does not work when not using UTF-16?
Maybe UTF-16 and UTF-8 both work, but - of course - no other  
encoding like ISO Latin or Mac Roman etc.?


The .strings files are actually a special case of plist files.  There  
are three supported formats:  first, the special .strings file format,  
which is UTF-16 plain text consisting of lines of


key = value;

pairs with optional comments; second, the XML plist format; third, the  
binary plist format.  The .strings file format is the recommended  
format for .strings files.  If you use this format, you should use  
UTF-16 with a BOM.  If you use the XML plist format, the encoding  
specification is as per XML, but almost always one would use UTF-8.   
If you use the XML or binary plist format, the contents must be a  
dictionary of strings.


Douglas Davidson


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unable to write in InfoPlist.strings file from cpp

2009-12-09 Thread Uli Kusterer
On 09.12.2009, at 06:11, Parimal Das wrote:
 Thanks a lot Greg.
 Interpret as UTF8 solved the problem.


 Be careful, though: Some MacOS versions have a bug where .strings files had to 
be UTF16 to actually work. I don't think Apple has fixed that yet.

Cheers,
-- Uli Kusterer
The witnesses of TeachText are everywhere...



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Unable to write in InfoPlist.strings file from cpp

2009-12-08 Thread Parimal Das
Hi

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: 屲屮䍆䉵湤汥䝥瑉湦潓瑲楮朠㴠≍慩求牯睳敲′⸳⁐䕎呁Ⱐ䍯

Any idea what is happening here??

Advance thanks.
-Parimal Das
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unable to write in InfoPlist.strings file from cpp

2009-12-08 Thread Greg Parker
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 gpar...@apple.com Runtime Wrangler


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unable to write in InfoPlist.strings file from cpp

2009-12-08 Thread Parimal Das
Thanks a lot Greg.
Interpret as UTF8 solved the problem.

-Parimal Das

On Tue, Dec 8, 2009 at 8:18 PM, Greg Parker gpar...@apple.com wrote:

 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 gpar...@apple.com Runtime Wrangler





-- 
--
Warm Regards,

Parimal Das
Webyog Softworks
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com