diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2017-02-03 13:06:34 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2017-02-03 13:06:34 +0000 |
| commit | bd51c20871bac7a49ea0adc443050f2894cfd5f3 (patch) | |
| tree | c551994131aa8f3315a21aeaf4f9bc2a8b757e89 /libunbound/python/doc/examples/example7.rst | |
| parent | 27c2fff0f2fef695b0599fc3931cacfc16376e88 (diff) | |
Diffstat (limited to 'libunbound/python/doc/examples/example7.rst')
| -rw-r--r-- | libunbound/python/doc/examples/example7.rst | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/libunbound/python/doc/examples/example7.rst b/libunbound/python/doc/examples/example7.rst index d4050215e435..2f48c8f0f26f 100644 --- a/libunbound/python/doc/examples/example7.rst +++ b/libunbound/python/doc/examples/example7.rst @@ -1,18 +1,33 @@ .. _example_idna: -================================================= Internationalized domain name support -================================================= +===================================== Unlike the libUnbound, pyUnbound is able to handle IDN queries. -.. literalinclude:: example7-1.py - :language: python +Automatic IDN DNAME conversion +------------------------------- -If we use unicode string in :meth:`unbound.ub_ctx.resolve` method, the IDN DNAME conversion (if it is necessary) is performed on background. +If we use unicode string in :meth:`unbound.ub_ctx.resolve` method, +the IDN DNAME conversion (if it is necessary) is performed on background. -.. literalinclude:: example7-2.py - :language: python +Source code +........... -The :class:`unbound.ub_data` class contains attributes suffix which converts the dname to UTF string. These attributes have the '_idn' suffix. -Apart from this aproach, two conversion functions exist (:func:`unbound.idn2dname` and :func:`unbound.dname2idn`). +.. literalinclude:: example7-1.py + :language: python + +IDN converted attributes +------------------------ + +The :class:`unbound.ub_data` class contains attributes suffix which converts +the dname to UTF string. These attributes have the ``_idn`` suffix. + +Apart from this aproach, two conversion functions exist +(:func:`unbound.idn2dname` and :func:`unbound.dname2idn`). + +Source code +........... + +.. literalinclude:: example7-2.py + :language: python |
