Latest 1.0.0
Homepage https://github.com/JotaMelo/JMUnidecode
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

JMUnidecode is an Objective-C port of the Python library unidecode (which is a Python port of the Text::Unidecode Perl module). It’s currently used on jMusic’s matching algorithm and I’ve finally decided to open source it. The same tests from the Python version were also ported.

There’s also a Swift version

From the unidecode README:

What Unidecode provides is a function that takes Unicode data and tries to represent it in ASCII characters (i.e., the universally displayable characters between 0x00 and 0x7F). The representation is almost always an attempt at transliteration — i.e., conveying, in Roman letters, the pronunciation expressed by the text in some other writing system.

Usage

#import "JMUnidecode.h"
NSLog(@"%@", [JMUnidecode unidecode:@"北亰"]); // Prints "Bei Jing" 
NSLog(@"%@", [JMUnidecode unidecode:@"ⓗⓘ ⓖⓘⓣⓗⓤⓑ"]); // Prints "hi github"
NSLog(@"%@", [JMUnidecode unidecode:@"Olá, GitHub"]); // Prints "Ola, GitHub"

Installation

CocoaPods

You can install JMUnidecode with CocoaPods

  • Add this line to your Podfile pod "JMUnidecode"
  • Run pod install

Manual

Just drop the JMUnidecode.h, JMUnidecode.m and JMUnidecodeData.json files in your project and you’re all set!

Author

Jota Melo, [email protected]

License

JMUnidecode is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "JMUnidecode",
    "version": "1.0.0",
    "summary": "JMUnidecode - unicode transliteration",
    "description": "With JMUnidecode you can convert "u5317u4eb0" to "Bei Jing", "u24d7u24d8 u24d6u24d8u24e3u24d7u24e4u24d1" to "hi github", "hu00e9llu00f3 u00e9vu00e9ryu00f3ne" to "hello everyone".",
    "homepage": "https://github.com/JotaMelo/JMUnidecode",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jota Melo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JotaMelo/JMUnidecode.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/Jota",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "JMUnidecode/Classes/**/*",
    "resource_bundles": {
        "JMUnidecode": [
            "JMUnidecode/Assets/*"
        ]
    }
}

Pin It on Pinterest

Share This