Latest 1.4.0
Homepage https://github.com/siuying/UniversalDetector
License Mozilla Public License
Platforms ios 6.0, osx 10.8, requires ARC
Authors

UniversalDetector for Objective-C

UniversalDetector is a wrapper for uchardet, which is based on C++ implementation of the universal charset detection library by Mozilla.

UniversalDetector is an encoding detector library, which takes a sequence of bytes in an unknown character encoding without any additional information, and attempts to determine the encoding of the text.

Usage

CFStringEncoding encoding = [UniversalDetector encodingWithData:data];
NSString* encodingStr      = [UniversalDetector encodingAsStringWithData:data];

Installation

If you use CocoaPods, add following line to your Podfile:

pod 'UniversalDetector'

Otherwise, add ‘UniversalDetector/.{h,m}’, ‘external/.{h,cpp}’, ‘external/universalchardet/src/base/*.{cpp,h,tab}’ and library ‘libstdc++’ to your project.

LICENSE

Mozilla Public License, refer to file LICENSE.

Latest podspec

{
    "name": "UniversalDetector",
    "version": "1.4.0",
    "license": {
        "type": "Mozilla Public License",
        "file": "LICENSE"
    },
    "summary": "Wrapper of uchardet for Objective-C.",
    "description": "UniversalDetector takes a sequence of bytes in an unknown character encoding without any additional information, and attempts to determine the encoding of the text.",
    "homepage": "https://github.com/siuying/UniversalDetector",
    "authors": {
        "Francis Chong": "[email protected]"
    },
    "source": {
        "git": "https://github.com/siuying/UniversalDetector.git",
        "tag": "1.4.0",
        "submodules": true
    },
    "source_files": [
        "UniversalDetector/*.{h,m}",
        "external/uchardet/src/*.{h,cpp}"
    ],
    "public_header_files": [
        "UniversalDetector/*.h",
        "external/uchardet/src/uchardet.h"
    ],
    "preserve_paths": "external/uchardet/src/*.{tab}",
    "platforms": {
        "ios": "6.0",
        "osx": "10.8"
    },
    "xcconfig": {
        "WARNING_CFLAGS": "-Wno-shorten-64-to-32 -Wno-logical-op-parentheses"
    },
    "libraries": "stdc++",
    "requires_arc": true
}

Pin It on Pinterest

Share This