For glibc, I want to permit _ in names, but I would like to use the default flags otherwise. I assumed that with libidn2 2.0.4, STD3 rules were disabled with flags 0, but this does not seem to be the case. I run this program in a UTF-8 locale: #include <err.h> #include <idn2.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> void print_1 (const char *name, const char *label, int flags) { char *result; int ret = idn2_lookup_ul (name, &result, flags); if (ret == IDN2_OK) { printf(" %s: [[%s]]\n", label, result); free (result); } else printf (" %s: %s\n", label, idn2_strerror_name (ret)); } void process (const char *name) { printf ("[[%s]]:\n", name); print_1 (name, "default", 0); print_1 (name, "USE_STD3_ASCII_RULES", IDN2_USE_STD3_ASCII_RULES); print_1 (name, "TRANSITIONAL", IDN2_TRANSITIONAL); print_1 (name, "NONTRANSITIONAL", IDN2_NONTRANSITIONAL); } int main (void) { if (setlocale (LC_ALL, "") == NULL) err (1, "setlocale"); process ("nämchen.example"); process ("nämchen_foo.example"); process ("nämchen$foo.example"); process ("nämchen`foo.example"); process ("nämchen;foo.example"); process ("buße.example"); return 0; } And I get (with libidn2-2.0.4-1.fc27.x86_64): [[nämchen.example]]: default: [[xn--nmchen-bua.example]] USE_STD3_ASCII_RULES: [[xn--nmchen-bua.example]] TRANSITIONAL: [[xn--nmchen-bua.example]] NONTRANSITIONAL: [[xn--nmchen-bua.example]] [[nämchen_foo.example]]: default: IDN2_DISALLOWED USE_STD3_ASCII_RULES: IDN2_DISALLOWED TRANSITIONAL: [[xn--nmchen_foo-q5a.example]] NONTRANSITIONAL: IDN2_DISALLOWED [[nämchen$foo.example]]: default: IDN2_DISALLOWED USE_STD3_ASCII_RULES: IDN2_DISALLOWED TRANSITIONAL: [[xn--nmchen$foo-q5a.example]] NONTRANSITIONAL: IDN2_DISALLOWED [[nämchen`foo.example]]: default: IDN2_DISALLOWED USE_STD3_ASCII_RULES: IDN2_DISALLOWED TRANSITIONAL: [[xn--nmchen`foo-q5a.example]] NONTRANSITIONAL: IDN2_DISALLOWED [[nämchen;foo.example]]: default: IDN2_DISALLOWED USE_STD3_ASCII_RULES: IDN2_DISALLOWED TRANSITIONAL: [[xn--nmchen;foo-q5a.example]] NONTRANSITIONAL: IDN2_DISALLOWED [[buße.example]]: default: [[xn--bue-6ka.example]] USE_STD3_ASCII_RULES: [[xn--bue-6ka.example]] TRANSITIONAL: [[busse.example]] NONTRANSITIONAL: [[xn--bue-6ka.example]] I don't want to use IDN2_TRANSITIONAL because it gives the wrong IDNA name for buße.example, so it seems to me that there aren't any good options at present.
Moved to upstream: https://gitlab.com/libidn/libidn2/issues/43
libidn2-2.0.4-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-22e691f5d2
libidn2-2.0.4-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-be760d6d28
libidn2-2.0.4-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-823d88dfeb
libidn2-2.0.4-3.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-8651f03a5a
libidn2-2.0.4-2.fc28: $ idn2 -N _x.com _x.com $ idn2 -N _ü.com idn2: toAscii: string contains a disallowed character $ idn2 -N ü.com xn--tda.com $ libidn2-2.0.4-3.fc28: $ idn2 -N _x.com _x.com $ idn2 -N _ü.com xn--_-eha.com $ idn2 -N ü.com xn--tda.com $
libidn2-2.0.4-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-823d88dfeb
libidn2-2.0.4-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-be760d6d28
libidn2-2.0.4-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-22e691f5d2
libidn2-2.0.4-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-8651f03a5a
libidn2-2.0.4-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
libidn2-2.0.4-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
libidn2-2.0.4-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
libidn2-2.0.4-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.