From 8c3ae8ddba18b4855d31ef3e6c85915fb1948c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Arias?= Date: Mon, 31 Mar 2014 00:52:36 +0000 Subject: [PATCH] Fix last change. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37778 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Framework/PCFileCreator.m | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5aa4bf7..98e4229 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-03-30 German Arias + + * 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 * Framework/PCFileCreator.m: Be sure to use an UTF8 string for the user diff --git a/Framework/PCFileCreator.m b/Framework/PCFileCreator.m index 6bc82c3..1e46c12 100644 --- a/Framework/PCFileCreator.m +++ b/Framework/PCFileCreator.m @@ -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]; }