Index: Source/NSPropertyList.m =================================================================== RCS file: /cvsroot/gnustep/gnustep/core/base/Source/NSPropertyList.m,v retrieving revision 1.15 diff -u -r1.15 NSPropertyList.m --- Source/NSPropertyList.m 3 Jul 2004 17:48:35 -0000 1.15 +++ Source/NSPropertyList.m 29 Jul 2004 13:23:16 -0000 @@ -41,6 +41,7 @@ #include "Foundation/NSUserDefaults.h" #include "Foundation/NSValue.h" #include "Foundation/NSDebug.h" +#include "GNUstepBase/Unicode.h" #include "GSPrivate.h" extern BOOL GSScanDouble(unichar*, unsigned, double*); @@ -356,17 +357,21 @@ } else { - unsigned length = pld->pos - start - shrink; + unsigned length; unichar *chars; + unichar *temp = NULL; + unsigned int temp_length = 0; unsigned j; unsigned k; + GSToUnicode(&temp, &temp_length, &pld->ptr[start], pld->pos - start, NSUTF8StringEncoding, NSDefaultMallocZone(), 0); + length = temp_length - shrink; chars = NSZoneMalloc(NSDefaultMallocZone(), sizeof(unichar) * length); escaped = 0; hex = NO; - for (j = start, k = 0; j < pld->pos; j++) + for (j = 0, k = 0; j < temp_length; j++) { - unsigned char c = pld->ptr[j]; + unichar c = temp[j]; if (escaped) { @@ -444,6 +449,9 @@ } } + NSZoneFree(NSDefaultMallocZone(), temp); + length = k; + if (pld->key == NO && pld->opt == NSPropertyListMutableContainersAndLeaves) { @@ -1024,11 +1032,11 @@ return nil; } - d = [string dataUsingEncoding: NSASCIIStringEncoding]; + d = [string dataUsingEncoding: NSUTF8StringEncoding]; if (d == nil) { [NSException raise: NSGenericException - format: @"Non-ascii data in string supposed to be property list"]; + format: @"(fixed) Non-ascii data in string supposed to be property list"]; } _pld.ptr = (unsigned char*)[d bytes]; _pld.pos = 0; @@ -2197,7 +2205,7 @@ // It begins with '