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

JMUnidecode

Version
License
Platform

JMUnidecode is a Swift 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 an Objective-C 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
print(JMUnidecode.unidecode("北亰")) // Prints "Bei Jing" 
print(JMUnidecode.unidecode("ⓗⓘ ⓖⓘⓣⓗⓤⓑ")) // Prints "hi github"
print(JMUnidecode.unidecode("Olá, GitHub")) // Prints "Ola, GitHub"

Installation

CocoaPods

You can install JMUnidecode with CocoaPods

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

Manual

Just drop the JMUnidecode.swift 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-Swift",
    "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-Swift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jota Melo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JotaMelo/JMUnidecode-Swift.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/*"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This