dnspython  1.16.0
About: dnspython is a DNS toolkit (for Python 2.x) that supports almost all record types.
  Fossies Dox: dnspython-1.16.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

dns.name.IDNA2008Codec Class Reference
Inheritance diagram for dns.name.IDNA2008Codec:
[legend]
Collaboration diagram for dns.name.IDNA2008Codec:
[legend]

Public Member Functions

def __init__ (self, uts_46=False, transitional=False, allow_pure_ascii=False, strict_decode=False)
 
def is_all_ascii (self, label)
 
def encode (self, label)
 
def decode (self, label)
 
- Public Member Functions inherited from dns.name.IDNACodec
def __init__ (self)
 

Public Attributes

 uts_46
 
 transitional
 
 allow_pure_ascii
 
 strict_decode
 

Detailed Description

IDNA 2008 encoder/decoder.

    *uts_46* is a ``bool``.  If True, apply Unicode IDNA
    compatibility processing as described in Unicode Technical
    Standard #46 (http://unicode.org/reports/tr46/).
    If False, do not apply the mapping.  The default is False.

    *transitional* is a ``bool``: If True, use the
    "transitional" mode described in Unicode Technical Standard
    #46.  The default is False.

    *allow_pure_ascii* is a ``bool``.  If True, then a label which
    consists of only ASCII characters is allowed.  This is less
    strict than regular IDNA 2008, but is also necessary for mixed
    names, e.g. a name with starting with "_sip._tcp." and ending
    in an IDN suffix which would otherwise be disallowed.  The
    default is False.

    *strict_decode* is a ``bool``: If True, then IDNA2008 checking
    is done when decoding.  This can cause failures if the name
    was encoded with IDNA2003.  The default is False.

Definition at line 165 of file name.py.

Constructor & Destructor Documentation

◆ __init__()

def dns.name.IDNA2008Codec.__init__ (   self,
  uts_46 = False,
  transitional = False,
  allow_pure_ascii = False,
  strict_decode = False 
)
Initialize the IDNA 2008 encoder/decoder.

Definition at line 189 of file name.py.

Member Function Documentation

◆ decode()

def dns.name.IDNA2008Codec.decode (   self,
  label 
)

◆ encode()

def dns.name.IDNA2008Codec.encode (   self,
  label 
)

◆ is_all_ascii()

def dns.name.IDNA2008Codec.is_all_ascii (   self,
  label 
)

Definition at line 198 of file name.py.

Referenced by dns.name.IDNA2008Codec.encode().

Member Data Documentation

◆ allow_pure_ascii

dns.name.IDNA2008Codec.allow_pure_ascii

Definition at line 194 of file name.py.

Referenced by dns.name.IDNA2008Codec.encode().

◆ strict_decode

dns.name.IDNA2008Codec.strict_decode

Definition at line 195 of file name.py.

Referenced by dns.name.IDNA2008Codec.decode().

◆ transitional

dns.name.IDNA2008Codec.transitional

Definition at line 193 of file name.py.

Referenced by dns.name.IDNA2008Codec.encode().

◆ uts_46

dns.name.IDNA2008Codec.uts_46

Definition at line 192 of file name.py.

Referenced by dns.name.IDNA2008Codec.decode(), and dns.name.IDNA2008Codec.encode().


The documentation for this class was generated from the following file: