erlang-idna icon indicating copy to clipboard operation
erlang-idna copied to clipboard

Error while trying to decode seemingly valid domain name

Open wantedru opened this issue 4 years ago • 1 comments

Domain name "xn--p5b2bfp5fh3fra.xn--45brj9c" seems valid, at least it's been succesfully decoded by chrome and various online punycode converters to "কোম্পানি.ভারত". But in elixir I receive the following error:

iex> :idna.decode('xn--p5b2bfp5fh3fra.xn--45brj9c')                   
** (exit) {:bad_label, {:nfc, 'Label must be in Normalization Form C'}}
    (idna 6.1.1) /deps/idna/src/idna.erl:157: :idna.check_nfc/1
    (idna 6.1.1) /deps/idna/src/idna.erl:255: :idna.check_label/4
    (idna 6.1.1) /deps/idna/src/idna.erl:313: :idna.ulabel/1
    (idna 6.1.1) /deps/idna/src/idna.erl:296: :idna.decode_1/2

wantedru avatar May 22 '21 10:05 wantedru

probably we shoudl handle the latest update of the specification.

benoitc avatar Feb 22 '24 09:02 benoitc