Interface nsIIDNServiceType

nsIIDNService interface.

IDN (Internationalized Domain Name) support. Provides facilities for manipulating IDN hostnames according to the specification set forth by the IETF.

IDN effort: http://www.ietf.org/html.characters/idn-charter.html http://www.i-dns.net

IDNA specification: http://search.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • This is the ToUnicode operation as specified in the IDNA proposal, with an additional step to encode the result in UTF-8. It takes an ACE-encoded hostname and performs ToUnicode to it, then encodes the resulting string into UTF8.

    Parameters

    • input: string

    Returns string

  • Normalizes and converts a host to UTF-8 if the host is in the IDN whitelist, otherwise converts it to ACE. This is useful for display purposes and to ensure an encoding consistent with nsIURI::GetHost(). If the result is ASCII or ACE encoded, |isASCII| will be true.

    Parameters

    • input: string
    • isASCII: boolean

    Returns string

  • Prepares the input hostname according to IDNA ToASCII operation, the input hostname is assumed to be UTF8-encoded.

    Parameters

    • input: string

    Returns string

  • Checks if the input string is ACE encoded or not.

    Parameters

    • input: string

    Returns boolean

  • Performs the unicode normalization needed for hostnames in IDN, for callers that want early normalization.

    Parameters

    • input: string

    Returns string

Generated using TypeDoc