Module DomainName::Punycode
In: lib/domain_name/punycode.rb

Methods

Classes and Modules

Class DomainName::Punycode::ArgumentError
Class DomainName::Punycode::BufferOverflowError

Constants

BASE = 36
TMIN = 1
TMAX = 26
SKEW = 38
DAMP = 700
INITIAL_BIAS = 72
INITIAL_N = 0x80
DELIMITER = '-'.freeze
MAXINT = (1 << 32) - 1
LOBASE = BASE - TMIN
CUTOFF = LOBASE * TMAX / 2
RE_NONBASIC = /[^\x00-\x7f]/
DECODE_DIGIT = {}.tap { |map| # ASCII A..Z map to 0..25 # ASCII a..z map to 0..25 (0..25).each { |i| map[65 + i] = map[97 + i] = i }   Returns the numeric value of a basic code point (for use in representing integers) in the range 0 to base-1, or nil if cp is does not represent a value.
ENCODE_DIGIT = proc { |d, flag| (d + 22 + (d < 26 ? 75 : 0) - (flag ? (1 << 5) : 0)).chr   Returns the basic code point whose value (when used for representing integers) is d, which must be in the range 0 to BASE-1. The lowercase form is used unless flag is true, in which case the uppercase form is used. The behavior is undefined if flag is nonzero and digit d has no uppercase form.
DOT = '.'.freeze
PREFIX = 'xn--'.freeze

Public Class methods

Decode a string encoded in Punycode

Decode a hostname using IDN/Punycode algorithms

Encode a string in Punycode

Encode a hostname using IDN/Punycode algorithms

[Validate]