From 71d8af26ec0f832c291e4892e2517c784d7c2e79 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 15 Feb 2009 10:49:03 -0500 Subject: [PATCH] When writing the temporary file to use for highlighting, use NSUTF8StringEncoding rather than NSASCIIStringEncoding * Source/BSSourceView.m: (setString:asFile:) --- CHANGES | 8 +++++++- Source/BSSourceView.m | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d69cf2f..584e055 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,13 @@ MacGDBp CHANGE LOG ================================================================================ -1.2.0 +1.2.1 +##################### +- Fix: The temporary file used for highlighting source code is now saved as UTF8 +so files with non-ASCII characters will now be highlighted + + +1.2 ##################### - Change: The "File" column now shows the tail rather than the head of the value, allowing you to see the last part of the path URI diff --git a/Source/BSSourceView.m b/Source/BSSourceView.m index 3b87a1d..a18f119 100644 --- a/Source/BSSourceView.m +++ b/Source/BSSourceView.m @@ -109,7 +109,7 @@ // create the temp file NSError *error = nil; NSString *tmpPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"MacGDBpHighlighter"]; - [source writeToFile:tmpPath atomically:NO encoding:NSASCIIStringEncoding error:&error]; + [source writeToFile:tmpPath atomically:NO encoding:NSUTF8StringEncoding error:&error]; if (error) { [textView setString:source]; -- 2.22.5