From d60fffd05b7b78e783f1525c4f4d6c4f832feadc Mon Sep 17 00:00:00 2001 From: Michael Ehrmann Date: Mon, 7 Oct 2013 18:31:24 +0200 Subject: [PATCH 01/13] fixing skip install for xcode app archive builds using @rpath instead of @executable_path --- UniversalDetector.xcodeproj/project.pbxproj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index ff0d04e..b99e08c 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -558,8 +558,9 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = UniversalDetector_Prefix.pch; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "@executable_path/../Frameworks"; + INSTALL_PATH = "@rpath"; PRODUCT_NAME = UniversalDetector; + SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; name = Debug; @@ -574,8 +575,9 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = UniversalDetector_Prefix.pch; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "@executable_path/../Frameworks"; + INSTALL_PATH = "@rpath"; PRODUCT_NAME = UniversalDetector; + SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; name = Release; From f45bcd5d9b8a9bde119ed66911edac75f2fd75fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Tue, 4 Mar 2014 13:19:34 +0100 Subject: [PATCH 02/13] Improving error handling in DecoderTest. --- DetectorTest.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DetectorTest.m b/DetectorTest.m index d2d4a6c..917f9d1 100644 --- a/DetectorTest.m +++ b/DetectorTest.m @@ -20,6 +20,11 @@ int main(int argc,char **argv) options:0 error:&error]; + if (data == nil) { + NSLog(@"%@", error); + continue; + } + NSString *str = nil; if (data == nil) { From cb4634f290832e46e267b79ab1e150523ba8c518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Tue, 4 Mar 2014 13:34:22 +0100 Subject: [PATCH 03/13] Improving DecoderTest output formatting. --- DetectorTest.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DetectorTest.m b/DetectorTest.m index 917f9d1..011b3bd 100644 --- a/DetectorTest.m +++ b/DetectorTest.m @@ -44,7 +44,7 @@ int main(int argc,char **argv) NSString *MIMECharsetName = [detector MIMECharset]; NSStringEncoding encoding = [detector encoding]; - str = [NSString stringWithFormat:@"%@\n\t\"%@\" (%@) confidence: %.1f%%", + str = [NSString stringWithFormat:@"%@\n" "\t" "\"%@\" (%@)\n" "\t" "confidence:% 6.1f%%", fileName, (encoding != 0) ? [NSString localizedNameOfStringEncoding:encoding] : @"UNKNOWN", (MIMECharsetName != nil) ? MIMECharsetName : @"UNKNOWN", From 3ba4811ec4d44df7c1c4cad8e073ba5c7b23d4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Tue, 4 Mar 2014 18:01:13 +0100 Subject: [PATCH 04/13] Adding AppKit text encoding guess to DecoderTest and comparing the results. --- DetectorTest.m | 50 ++++++++++++++++++++- UniversalDetector.xcodeproj/project.pbxproj | 4 ++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/DetectorTest.m b/DetectorTest.m index 011b3bd..ab176c3 100644 --- a/DetectorTest.m +++ b/DetectorTest.m @@ -1,4 +1,5 @@ #import +#import #import @@ -43,13 +44,58 @@ int main(int argc,char **argv) [detector analyzeData:data]; NSString *MIMECharsetName = [detector MIMECharset]; NSStringEncoding encoding = [detector encoding]; + NSStringEncoding appKitEncoding = 0; - str = [NSString stringWithFormat:@"%@\n" "\t" "\"%@\" (%@)\n" "\t" "confidence:% 6.1f%%", + //if (encoding == NSWindowsCP1252StringEncoding || encoding == NSShiftJISStringEncoding) + { + NSDictionary *documentAttributes = nil; + + // UniversalDetector does not differentiate between Windows Latin 1 and Mac Roman + // while AppKit has an apparent Mac Roman bias. + NSAttributedString *text = [[NSAttributedString alloc] initWithData:data + options:nil + documentAttributes:&documentAttributes + error:&error]; + + if (text == nil) { + NSLog(@"%@", error); + continue; + } + else { + [text release]; + + NSNumber *encodingNumber = documentAttributes[NSCharacterEncodingDocumentAttribute]; + appKitEncoding = [encodingNumber intValue]; + } + } + + NSString *appKitResultString = nil; + if (appKitEncoding != 0) { + if (appKitEncoding != encoding) { + appKitResultString = [NSString stringWithFormat:@"\"%@\"", + [NSString localizedNameOfStringEncoding:appKitEncoding] + ]; + } + else { + appKitResultString = @"(same result)"; + } + } + + str = [NSString stringWithFormat: + @"%@\n" + "\t" "\"%@\" (%@)\n" + "\t" "confidence:% 6.1f%%" + @"\n" + "\t" "AppKit: %@", fileName, (encoding != 0) ? [NSString localizedNameOfStringEncoding:encoding] : @"UNKNOWN", (MIMECharsetName != nil) ? MIMECharsetName : @"UNKNOWN", - ([detector confidence] * 100.0f) + ([detector confidence] * 100.0f), + (appKitResultString != nil) ? appKitResultString : @"UNDEFINED" ]; + + + printf("%s\n\n", [str UTF8String]); diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index b99e08c..9104d65 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 3D4F0C3D11F42E3C00603CE3 /* WrappedUniversalDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D4F0C3B11F42E3C00603CE3 /* WrappedUniversalDetector.h */; }; 3D724E301174182900CD3CBD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D724E2F1174182900CD3CBD /* Foundation.framework */; }; 3D724E4E11741AEE00CD3CBD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D724E2F1174182900CD3CBD /* Foundation.framework */; }; + 3D81E2B318C5F92C00834BCA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D81E2B218C5F92C00834BCA /* AppKit.framework */; }; 3D8275CD16B943C100061FD9 /* nsMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D8275CB16B943C100061FD9 /* nsMemory.h */; }; 3D8275D616B946F100061FD9 /* nsDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D8275D516B946F100061FD9 /* nsDebug.h */; }; /* End PBXBuildFile section */ @@ -122,6 +123,7 @@ 3D4F0C3A11F42E3C00603CE3 /* WrappedUniversalDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WrappedUniversalDetector.cpp; sourceTree = ""; }; 3D4F0C3B11F42E3C00603CE3 /* WrappedUniversalDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WrappedUniversalDetector.h; sourceTree = ""; }; 3D724E2F1174182900CD3CBD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 3D81E2B218C5F92C00834BCA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 3D8275CB16B943C100061FD9 /* nsMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsMemory.h; sourceTree = ""; }; 3D8275D516B946F100061FD9 /* nsDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsDebug.h; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; @@ -133,6 +135,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3D81E2B318C5F92C00834BCA /* AppKit.framework in Frameworks */, 3D724E4E11741AEE00CD3CBD /* Foundation.framework in Frameworks */, 1B0DDCB30A2D0B2E0009B697 /* UniversalDetector.framework in Frameworks */, ); @@ -161,6 +164,7 @@ 0867D691FE84028FC02AAC07 /* UniversalCharDet */ = { isa = PBXGroup; children = ( + 3D81E2B218C5F92C00834BCA /* AppKit.framework */, 08FB77AEFE84172EC02AAC07 /* Classes */, 3D8275C716B943C100061FD9 /* mozilla-release */, 1B0DDB110A2CB1B20009B697 /* universalchardet */, From 661f515d8af0ddb560f5578842505056055123fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Tue, 4 Mar 2014 18:01:51 +0100 Subject: [PATCH 05/13] =?UTF-8?q?Making=20=E2=80=9C-encoding=E2=80=9D=20ea?= =?UTF-8?q?sier=20to=20debug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UniversalDetector.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UniversalDetector.m b/UniversalDetector.m index a0736f2..eb8c089 100644 --- a/UniversalDetector.m +++ b/UniversalDetector.m @@ -78,7 +78,9 @@ -(NSStringEncoding)encoding // Kludge to make strings decode properly anyway. if(cfenc==kCFStringEncodingEUC_KR) cfenc=kCFStringEncodingDOSKorean; - return CFStringConvertEncodingToNSStringEncoding(cfenc); + NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(cfenc); + + return encoding; } -(float)confidence From 6e80c5839e3f28a055c4edb8d3987b5eaaff07e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Tue, 4 Mar 2014 18:02:09 +0100 Subject: [PATCH 06/13] Mapping kCFStringEncodingShiftJIS to kCFStringEncodingDOSJapanese. --- UniversalDetector.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UniversalDetector.m b/UniversalDetector.m index eb8c089..acc4054 100644 --- a/UniversalDetector.m +++ b/UniversalDetector.m @@ -77,6 +77,8 @@ -(NSStringEncoding)encoding // UniversalDetector detects CP949 but returns "EUC-KR" because CP949 lacks an IANA name. // Kludge to make strings decode properly anyway. if(cfenc==kCFStringEncodingEUC_KR) cfenc=kCFStringEncodingDOSKorean; + // Something similar happens with "Shift_JIS". + if(cfenc==kCFStringEncodingShiftJIS) cfenc=kCFStringEncodingDOSJapanese; NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(cfenc); From 99a27b1d646ffddfadbfec786fa4ac4cf048a792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Thu, 22 May 2014 15:40:59 +0200 Subject: [PATCH 07/13] Improving DetectorTest. --- DetectorTest.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DetectorTest.m b/DetectorTest.m index ab176c3..94ce5fa 100644 --- a/DetectorTest.m +++ b/DetectorTest.m @@ -103,5 +103,6 @@ int main(int argc,char **argv) } [pool release]; - return 0; + + return EXIT_SUCCESS; } \ No newline at end of file From 9dd0c8f7306b126f3c1cfe05e0268e709655df1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Thu, 22 May 2014 15:41:16 +0200 Subject: [PATCH 08/13] Project updated by Xcode 5.1.1. --- UniversalDetector.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index 9104d65..4cea255 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -421,7 +421,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0510; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "UniversalDetector" */; compatibilityVersion = "Xcode 3.2"; From fde583f4da4b1cd0cc61b84b69f8b0ab904d7089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Thu, 22 May 2014 16:45:44 +0200 Subject: [PATCH 09/13] Implementing support for UniversalDetectorUseMacRomanHeuristic. --- DetectorTest.m | 3 +++ UniversalDetector.h | 5 +++++ UniversalDetector.m | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/DetectorTest.m b/DetectorTest.m index 94ce5fa..02eab0c 100644 --- a/DetectorTest.m +++ b/DetectorTest.m @@ -7,6 +7,9 @@ int main(int argc,char **argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [[NSUserDefaults standardUserDefaults] setBool:YES + forKey:UniversalDetectorUseMacRomanHeuristic]; + NSError *error = nil; for (int i = 1; i < argc; i++) diff --git a/UniversalDetector.h b/UniversalDetector.h index 6457448..4059943 100644 --- a/UniversalDetector.h +++ b/UniversalDetector.h @@ -1,10 +1,15 @@ #import +// You can enable this heuristic by setting the BOOL with that key in NSUserDefaults -standardUserDefaults to YES. +// In this case, only -encoding wll be valid and -MIMECharset will be invalid. +extern NSString * const UniversalDetectorUseMacRomanHeuristic; + @interface UniversalDetector:NSObject { void *detectorPtr; NSString *charsetName; float confidence; + BOOL possiblyMacRoman; } -(void)analyzeContentsOfFile:(NSString *)path; diff --git a/UniversalDetector.m b/UniversalDetector.m index acc4054..5931fe7 100644 --- a/UniversalDetector.m +++ b/UniversalDetector.m @@ -1,6 +1,10 @@ #import "UniversalDetector.h" #import "WrappedUniversalDetector.h" + +NSString * const UniversalDetectorUseMacRomanHeuristic = @"UniversalDetectorUseMacRomanHeuristic"; + + @implementation UniversalDetector -(id)init @@ -41,6 +45,39 @@ -(void)analyzeData:(NSData *)data -(void)analyzeBytes:(const char *)data length:(int)len { UniversalDetectorHandleData(detectorPtr, data, len); + + BOOL useMacRomanHeuristic = [[NSUserDefaults standardUserDefaults] boolForKey:UniversalDetectorUseMacRomanHeuristic]; + + if (useMacRomanHeuristic) { + // Search for a carriage return (cr) without a following newline. + // We do this to determine, if the data could possibly be MacRoman. + const size_t searchWindowSize = 4096; + char *crPtr = memchr(data, '\r', MIN(len, searchWindowSize)); + if (crPtr == NULL) { + possiblyMacRoman = NO; + } + else { + const int lastIndex = len - 1; + int crIndex = (crPtr - data); + + // Check, if we are at least one byte before the end. + if (crIndex < lastIndex) { + if (data[crIndex+1] == '\n') { + possiblyMacRoman = NO; + } + else { + possiblyMacRoman = YES; + } + } + else { + possiblyMacRoman = YES; + } + } + } + else { + possiblyMacRoman = NO; + } + [charsetName release]; charsetName=nil; } @@ -82,6 +119,12 @@ -(NSStringEncoding)encoding NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(cfenc); + if (possiblyMacRoman && + (encoding == NSWindowsCP1252StringEncoding || + encoding == NSShiftJISStringEncoding)) { + encoding = NSMacOSRomanStringEncoding; + } + return encoding; } From 4d28ce43b26efa54f5c2f037165211651a340b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Mon, 27 Oct 2014 14:05:09 +0100 Subject: [PATCH 10/13] Project upgraded by Xcode 6.1. Disabling GCC_WARN_64_TO_32_BIT_CONVERSION due to many cases of reliance on implicit conversion. --- UniversalDetector.xcodeproj/project.pbxproj | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index 4cea255..d065451 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -421,7 +421,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0510; + LastUpgradeCheck = 0610; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "UniversalDetector" */; compatibilityVersion = "Xcode 3.2"; @@ -594,12 +594,15 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; @@ -619,12 +622,15 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; From 2a9e3e4a18f0e9a908a9e377fb04bdb6c6013bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Fri, 17 Apr 2015 13:11:01 +0200 Subject: [PATCH 11/13] Project updated by Xcode 6.3. --- UniversalDetector.xcodeproj/project.pbxproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index d065451..10d98ba 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -421,7 +421,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0630; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "UniversalDetector" */; compatibilityVersion = "Xcode 3.2"; @@ -601,6 +601,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -629,6 +630,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; From 9d5dff9f34dc69d87a1dbdd0097c46f3d055941c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Sun, 27 Dec 2015 21:50:05 +0100 Subject: [PATCH 12/13] Project upgraded by Xcode 7.2. --- Info.plist | 4 ++-- UniversalDetector.xcodeproj/project.pbxproj | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Info.plist b/Info.plist index aaeb47d..5c18bd9 100644 --- a/Info.plist +++ b/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - org.mozilla.universalchardet + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index 10d98ba..88ce5fa 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -421,7 +421,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastUpgradeCheck = 0720; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "UniversalDetector" */; compatibilityVersion = "Xcode 3.2"; @@ -563,6 +563,7 @@ GCC_PREFIX_HEADER = UniversalDetector_Prefix.pch; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@rpath"; + PRODUCT_BUNDLE_IDENTIFIER = org.mozilla.universalchardet; PRODUCT_NAME = UniversalDetector; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; @@ -580,6 +581,7 @@ GCC_PREFIX_HEADER = UniversalDetector_Prefix.pch; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@rpath"; + PRODUCT_BUNDLE_IDENTIFIER = org.mozilla.universalchardet; PRODUCT_NAME = UniversalDetector; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; @@ -599,6 +601,7 @@ COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; From 98ab3fbb929c1d72515144a4658fa7fa4af4df8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Tue, 19 Nov 2019 04:39:34 +0100 Subject: [PATCH 13/13] =?UTF-8?q?Enable=20building=20with=20recent=20Xcode?= =?UTF-8?q?.=20This=20is=20required=20for=20building=20against=20Clang?= =?UTF-8?q?=E2=80=99s=20C++=20standard=20library.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UniversalDetector.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector.xcodeproj/project.pbxproj index 88ce5fa..6a3c328 100644 --- a/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector.xcodeproj/project.pbxproj @@ -612,7 +612,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; SKIP_INSTALL = YES; }; @@ -641,7 +641,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; SKIP_INSTALL = YES; }; name = Release;