IDN Internation Domain Names?

Discussion in 'Ruby' started by Hadmut Danisch, Jul 23, 2005.

  1. Hi,

    any library for ruby to convert domain names from and to
    IDN?

    regards
    Hadmut
     
    Hadmut Danisch, Jul 23, 2005
    #1
    1. Advertising

  2. On 7/22/05, Hadmut Danisch <> wrote:
    > any library for ruby to convert domain names from and to
    > IDN?


    Not that I know of, but aren't they supposed to just be UTF-8?

    -austin
    --=20
    Austin Ziegler *
    * Alternate:
     
    Austin Ziegler, Jul 24, 2005
    #2
    1. Advertising

  3. On 7/25/05, Austin Ziegler <> wrote:
    > On 7/22/05, Hadmut Danisch <> wrote:
    > > any library for ruby to convert domain names from and to
    > > IDN?

    >=20
    > Not that I know of, but aren't they supposed to just be UTF-8?


    Me too not sure,if therez any......But whats the need of it.

    Dibya
    >=20
    > -austin
    > --
    > Austin Ziegler *
    > * Alternate:
    >=20
    >
     
    Dibya Prakash, Jul 25, 2005
    #3
  4. On Mon, 25 Jul 2005 00:40:55 +0200, Austin Ziegler <>=
    =20
    wrote:

    > On 7/22/05, Hadmut Danisch <> wrote:
    >> any library for ruby to convert domain names from and to
    >> IDN?

    >
    > Not that I know of, but aren't they supposed to just be UTF-8?


    No, they are encoded using Punycode:

    http://en.wikipedia.org/wiki/Punycode

    With a quick search for "ruby punycode", I found:

    http://raa.ruby-lang.org/project/punycode4r/

    And it seems to work:

    Punycode.encode(Iconv.iconv("UCS-4LE", "ISO-8859-15", "b=FCcher")[0])
    =3D> "bcher-kva"

    (From the wikipedia article: "b=FCcher.ch would be represented as =20
    xn--bcher-kva.ch in IDNA")

    Punycode.encode seems to expect "UCS-4LE" encoded strings.

    HTH,
    Dominik
     
    Dominik Bathon, Jul 25, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Infant Newbie
    Replies:
    2
    Views:
    3,306
    Infant Newbie
    Nov 12, 2003
  2. =?Utf-8?B?VENEb2xwaGluLg==?=

    Webserver needs to be domain controller or just joind to domain?

    =?Utf-8?B?VENEb2xwaGluLg==?=, Sep 22, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    487
    =?Utf-8?B?VENEb2xwaGluLg==?=
    Sep 22, 2005
  3. AF
    Replies:
    8
    Views:
    1,159
    Chrissy Cruiser
    Aug 23, 2004
  4. Jan Burse

    java.net.IDN jar for JDK 1.5?

    Jan Burse, Jul 26, 2011, in forum: Java
    Replies:
    5
    Views:
    997
    Arne Vajhøj
    Jul 28, 2011
  5. Tuxedo
    Replies:
    1
    Views:
    321
    Tuxedo
    Nov 12, 2012
Loading...

Share This Page