apply TR#46 non-transitional processing by default

This switches the default library behavior from "pure" IDNA2008 to IDNA2008 + non-transitional processing. This can be API and ABI break for certain applications which intentionally needed the non amended IDNA2008. It is done in the interest of interoperability based on the fact that this is what most application writers care about rather than strict compliance with a particular protocol. Resolves #49Signed-off-by: Nikos Mavrogiannopoulos's avatarNikos Mavrogiannopoulos <nmav@gnutls.org>
parent 3922ad2c
Pipeline #21934337 passed with stages
in 7 minutes 29 seconds
......@@ -4,6 +4,13 @@ See the end for copying conditions.
* Version 2.0.5 (unreleased)
** Switched the default library behavior to IDNA2008 as amended
by TR#46 (non-transitional). That default behavior is enabled when
no flags are specified to function calls. Applications can utilize the
%IDN2_NO_TR46 flag to switch to the unamended IDNA2008. This is done in
the interest of interoperability based on the fact that this is what application
writers care about rather than strict compliance with a particular protocol.
** Fixed memleak in idn2_to_unicode_8zlz()
** Return error (IDN2_ICOV_FAIL) on charset conversion errors
......
......@@ -51,8 +51,8 @@ static int set_default_flags(int *flags)
if (((*flags) & (IDN2_TRANSITIONAL|IDN2_NONTRANSITIONAL)) && ((*flags) & IDN2_NO_TR46))
return IDN2_INVALID_FLAGS;
if (!((*flags) & (IDN2_TRANSITIONAL|IDN2_NONTRANSITIONAL)))
*flags |= IDN2_NO_TR46;
if (!((*flags) & (IDN2_NO_TR46|IDN2_TRANSITIONAL)))
*flags |= IDN2_NONTRANSITIONAL;
return IDN2_OK;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment