Author: mlytwyn Date: Thu Jan 26 16:12:43 2017 New Revision: 40302 URL: http://svn.gna.org/viewcvs/gnustep?rev=40302&view=rev Log: Fix <string> processing for XIB 5
Modified: libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m Modified: libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m?rev=40302&r1=40301&r2=40302&view=diff ============================================================================== --- libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m (original) +++ libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m Thu Jan 26 16:12:43 2017 @@ -2321,6 +2321,22 @@ } #endif } + else // Check for required fixes for XIB 5 processing changes to old element types... + { + NSString *elementName = [element type]; + + if ([@"string" isEqualToString: elementName]) + { + // <string> now has base64-UTF8 as a bool attribute... + if ([[element attributeForKey: @"base64-UTF8"] boolValue]) + { + NSData *data = [[NSData alloc] initWithBase64EncodedString: object + options: NSDataBase64DecodingIgnoreUnknownCharacters]; + object = AUTORELEASE([[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding]); + RELEASE(data); + } + } + } return object; } @@ -2642,7 +2658,7 @@ object = [currentElement attributeForKey: key]; } } - + #if 0 if (object == nil) NSWarnMLog(@"no object for key: %@", key); _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs