Skip to content

About

Wrapper of uchardet for Objective-C. UniversalDetector2 takes a sequence of bytes in an unknown character encoding without any additional information, and attempts to determine the encoding of the text.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

UniversalDetector2 for Objective-C

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

UniversalDetector2 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.

UniversalDetector2 is a drop-in replacement for UniversalDetector with an updated version of the underlying uchardet library.

Usage

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

Installation

Swift Package Manager

Add the package dependency in Xcode or in Package.swift:

.package(url: "https://github.com/amake/UniversalDetector2.git", from: "2.0.2")

Then add UniversalDetector2 to your target dependencies.

CocoaPods

pod 'UniversalDetector2'

LICENSE

Mozilla Public License, refer to file LICENSE.

About

Wrapper of uchardet for Objective-C. UniversalDetector2 takes a sequence of bytes in an unknown character encoding without any additional information, and attempts to determine the encoding of the text.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages