Fix last change.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37778 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Germán Arias 2014-03-31 00:52:36 +00:00
parent 93438554c3
commit 8c3ae8ddba
2 changed files with 21 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2014-03-30 German Arias <germanandre@gmx.es>
* Framework/PCFileCreator.m: Fix last change to ensure all string in the
file is UTF-8, since GNU make can't handle UTF-16 (this change is for
Windows).
2014-03-27 German Arias <germanandre@gmx.es>
* Framework/PCFileCreator.m: Be sure to use an UTF8 string for the user

View file

@ -278,7 +278,13 @@ static NSDictionary *dict = nil;
NSString *fn = [aFile stringByDeletingPathExtension];
NSRange subRange;
#ifdef WIN32
file = [[NSMutableString stringWithContentsOfFile: newFile
encoding: NSUTF8StringEncoding
error: NULL] retain];
#else
file = [[NSMutableString stringWithContentsOfFile:newFile] retain];
#endif
while ((subRange = [file rangeOfString:@"$FULLFILENAME$"]).length)
{
@ -335,7 +341,16 @@ static NSDictionary *dict = nil;
withString:[[NSNumber numberWithInt:year] stringValue]];
}
#ifdef WIN32
[file writeToFile: newFile
atomically: YES
encoding: NSUTF8StringEncoding
error: NULL];
#else
[file writeToFile:newFile atomically:YES];
#endif
[file release];
}