mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix output of property lists in incorrect encoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15144 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ec82855b5b
commit
d70630d4ed
3 changed files with 18 additions and 9 deletions
|
@ -10,6 +10,8 @@
|
|||
style property-lists rather than new style or xml style.
|
||||
* Source/NSUser.m: Use USERPROFILE for default home directory on
|
||||
windoze.
|
||||
* Source/NSArray.m: Write non-xml property lists as ascii.
|
||||
* Source/NSDictionary.m: Write non-xml property lists as ascii.
|
||||
|
||||
2002-11-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -1029,18 +1029,20 @@ static int compare(id elem1, id elem2, void* context)
|
|||
{
|
||||
NSDictionary *loc = GSUserDefaultsDictionaryRepresentation();
|
||||
NSString *desc = nil;
|
||||
NSData *data;
|
||||
|
||||
if (GSMacOSXCompatiblePropertyLists() == YES)
|
||||
{
|
||||
GSPropertyListMake(self, loc, YES, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSUTF8StringEncoding];
|
||||
}
|
||||
else
|
||||
{
|
||||
GSPropertyListMake(self, loc, NO, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSASCIIStringEncoding];
|
||||
}
|
||||
|
||||
return [[desc dataUsingEncoding: NSUTF8StringEncoding]
|
||||
writeToFile: path atomically: useAuxiliaryFile];
|
||||
return [data writeToFile: path atomically: useAuxiliaryFile];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1053,18 +1055,20 @@ static int compare(id elem1, id elem2, void* context)
|
|||
{
|
||||
NSDictionary *loc = GSUserDefaultsDictionaryRepresentation();
|
||||
NSString *desc = nil;
|
||||
NSData *data;
|
||||
|
||||
if (GSMacOSXCompatiblePropertyLists() == YES)
|
||||
{
|
||||
GSPropertyListMake(self, loc, YES, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSUTF8StringEncoding];
|
||||
}
|
||||
else
|
||||
{
|
||||
GSPropertyListMake(self, loc, NO, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSASCIIStringEncoding];
|
||||
}
|
||||
|
||||
return [[desc dataUsingEncoding: NSUTF8StringEncoding]
|
||||
writeToURL: url atomically: useAuxiliaryFile];
|
||||
return [data writeToURL: url atomically: useAuxiliaryFile];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -743,18 +743,19 @@ compareIt(id o1, id o2, void* context)
|
|||
{
|
||||
NSDictionary *loc = GSUserDefaultsDictionaryRepresentation();
|
||||
NSString *desc = nil;
|
||||
NSData *data;
|
||||
|
||||
if (GSMacOSXCompatiblePropertyLists() == YES)
|
||||
{
|
||||
GSPropertyListMake(self, loc, YES, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSUTF8StringEncoding];
|
||||
}
|
||||
else
|
||||
{
|
||||
GSPropertyListMake(self, loc, NO, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSASCIIStringEncoding];
|
||||
}
|
||||
|
||||
return [[desc dataUsingEncoding: NSUTF8StringEncoding]
|
||||
writeToFile: path atomically: useAuxiliaryFile];
|
||||
return [data writeToFile: path atomically: useAuxiliaryFile];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -767,18 +768,20 @@ compareIt(id o1, id o2, void* context)
|
|||
{
|
||||
NSDictionary *loc = GSUserDefaultsDictionaryRepresentation();
|
||||
NSString *desc = nil;
|
||||
NSData *data;
|
||||
|
||||
if (GSMacOSXCompatiblePropertyLists() == YES)
|
||||
{
|
||||
GSPropertyListMake(self, loc, YES, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSUTF8StringEncoding];
|
||||
}
|
||||
else
|
||||
{
|
||||
GSPropertyListMake(self, loc, NO, NO, 2, &desc);
|
||||
data = [desc dataUsingEncoding: NSASCIIStringEncoding];
|
||||
}
|
||||
|
||||
return [[desc dataUsingEncoding: NSUTF8StringEncoding]
|
||||
writeToURL: url atomically: useAuxiliaryFile];
|
||||
return [data writeToURL: url atomically: useAuxiliaryFile];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue