Here is a test to check libidn behavior on standard linux implementation.
Makefile gives you a hint how to build binaries (maybe some paths need tuning).
To get libidn2 use 'git clone https://gitlab.com/libidn/libidn2.git' and check CONTRIBUTING.md guide how to build library
