The function sets "the local encoding" to name.
The local encoding value affects results of IDN_UNICODECONV and
IDN_LOCALCONV actions in encoding and decoding conversions.
If name argument is NULL, the local encoding is determined by
For example, the locale category LC_CTYPE has been set to "ja_JP.UTF-8",
the idnkit library supposes the local encoding is "UTF-8".
If an application changes its locale setting, also the local encoding
value is changed automatically.
However, once a non-NULL local encoding name has been set by
idn_setlocalencoding(), or set by IDN_LOCAL_CODESET environment
variable, the local encoding will not be changed by locale information
Upon success, idn_setlocalencoding() returns idn_success.
Otherwise, it returns an error code.
See idn_result_tostring(3) for the complete list of error codes.