GithubHelp home page GithubHelp logo

dlamacchia / twitter-ifunicodeurl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karelia/ifunicodeurl

0.0 2.0 0.0 3.27 MB

Category to add internationalized domain name support to NSURL

License: Other

Makefile 3.62% C++ 0.67% C 24.55% Objective-C 56.57% Batchfile 0.42% Shell 0.10% Java 13.93% HTML 0.13%

twitter-ifunicodeurl's Introduction

About

IFUnicodeURL is a category for NSURL which will allow it to support Internationalized domain names in URLs.

Usage

Usage is quite simple. Where you'd have normally used NSURL's URLWithString: (or initWithString:) methods, simply use the unicode versions added by the category. There is also a method to retrieve the URL as a string with the hostname converted back into Unicode:

NSURL *url = [NSURL URLWithUnicodeString:@"http://➡.ws/鞰齒"];
NSLog( @"The URL: %@", [url absoluteString] );
NSLog( @"The Unicode URL: %@", [url unicodeAbsoluteString] );

Notes

This uses code from IDN SDK from Verisign, Inc. The entire IDN SDK source package is included in IDNSDK-1.1.0/. I have pulled out and slightly modified (to avoid compiler and analyzer warnings) the files and headers needed so that building this in Xcode is as easy as adding the IFUnicodeURL folder to your project.

Take note of the IDNSDK license which can be found in IDNSDK-1.1.0/doc. (The license is basically a BSD-like license.) The IFUnicodeURL category is licensed under the Simplified BSD License (see IFUnicodeURL-LICENSE.txt)

Author

Sean Heber (@BigZaphod on Twitter) http://www.iconfactory.com

twitter-ifunicodeurl's People

Contributors

samdeane avatar mikeabdullah avatar bigzaphod avatar

Watchers

David LaMacchia avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.