diff options
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/mozilla/include/NSURL+Utils.m | 17 | ||||
-rw-r--r-- | third_party/mozilla/include/README.chromium | 7 |
2 files changed, 22 insertions, 2 deletions
diff --git a/third_party/mozilla/include/NSURL+Utils.m b/third_party/mozilla/include/NSURL+Utils.m index a3b9098..300facd 100644 --- a/third_party/mozilla/include/NSURL+Utils.m +++ b/third_party/mozilla/include/NSURL+Utils.m @@ -79,7 +79,14 @@ long size; size = GetMaxResourceSize(urlResHandle); - ret = [NSURL URLWithString:[NSString stringWithCString:(char *)*urlResHandle length:size]]; +// Begin Google Modified +// ret = [NSURL URLWithString:[NSString stringWithCString:(char *)*urlResHandle length:size]]; + NSString *urlString = [[[NSString alloc] initWithBytes:(void *)*urlResHandle + length:size + encoding:NSMacOSRomanStringEncoding] // best guess here + autorelease]; + ret = [NSURL URLWithString:urlString]; +// End Google Modified } CloseResFile(resRef); @@ -108,7 +115,13 @@ // Is this really an IE .url file? if (inFile) { NSCharacterSet *newlines = [NSCharacterSet characterSetWithCharactersInString:@"\r\n"]; - NSScanner *scanner = [NSScanner scannerWithString:[NSString stringWithContentsOfFile:inFile]]; + // Begin Google Modified +// NSScanner *scanner = [NSScanner scannerWithString:[NSString stringWithContentsOfFile:inFile]]; + NSString *fileString = [NSString stringWithContentsOfFile:inFile + encoding:NSWindowsCP1252StringEncoding // best guess here + error:nil]; + NSScanner *scanner = [NSScanner scannerWithString:fileString]; + // End Google Modified [scanner scanUpToString:@"[InternetShortcut]" intoString:nil]; if ([scanner scanString:@"[InternetShortcut]" intoString:nil]) { diff --git a/third_party/mozilla/include/README.chromium b/third_party/mozilla/include/README.chromium index d01fa6c..12c22a3 100644 --- a/third_party/mozilla/include/README.chromium +++ b/third_party/mozilla/include/README.chromium @@ -34,4 +34,11 @@ nspluginroot.h The following files come from mozilla/camino and are not part of the Gecko SDK: +NSPasteboard+Utils.h/m +NSScreen+Utils.h/m +NSString+Utils.h/m +NSURL+Utils.h/m NSWorkspace+Utils.h/m + +NSURL+Utils.m was modified to use non-deprecated Cocoa APIs to allow compilation +on future versions of Mac OS X. |