Encoding Modules
encodings.idna
Implements the standard-library IDNA codec for internationalized domain labels, based on the older IDNA 2003 rules. It converts Unicode domain names into ASCII labels suitable for protocols that require ASCII. It is not a full URL parser or a defense against visually confusable domain names.
Formal Syntax & Structure
python syntaxpython
import encodings.idnaReturn Value
module
Module namespace available through import; import is a statement, not a value-returning expression.
Working Example
Example Snippetpython
import encodings.idnaprint("bücher.example".encode("idna").decode("ascii"))