* Source/NSPropertyList.m (-[GSBinaryPLGenerator storeString:):

Write unicode strings in big-endian instead of little-endian.
The resulting plists now load properly on OS X. Thanks to
rdemet for bug report.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35697 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2012-10-16 02:55:13 +00:00
parent 9eb4770f5a
commit 8b7f4c85c6
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2012-10-15 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSPropertyList.m (-[GSBinaryPLGenerator storeString:):
Write unicode strings in big-endian instead of little-endian.
The resulting plists now load properly on OS X. Thanks to
rdemet for bug report.
2012-10-15 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSCharacterSet.h:

View file

@ -3736,7 +3736,11 @@ isEqualFunc(const void *item1, const void *item2,
[dest setLength: offset + sizeof(unichar)*len];
buffer = [dest mutableBytes] + offset;
[string getCharacters: (unichar*)buffer];
#if GS_WORDS_BIGENDIAN
// Always store in big-endian, so if machine is little-endian,
// perform byte-swapping.
#if !GS_WORDS_BIGENDIAN
{
int i;
for (i = 0; i < len; i++)