Wolfram Research

Function Repository Resource:

EncodeToIDNA

Source Notebook

Encode a string to the IDNA format

Contributed by: Arnoud Buzing

ResourceFunction["EncodeToIDNA"][session,string]

encodes string to the IDNA format.

Details and Options

Requires the Python idna package (pip install idna).

Examples

Basic Examples

Start a session:

In[1]:=
session = StartExternalSession["Python"]

Encode a string to the IDNA format:

In[2]:=
ResourceFunction["EncodeToIDNA"][session, "ドメイン.テスト"]
Out[2]=

Resource History

License Information