<div dir="ltr">Hello Raimo,<br><br><div>You're welcome. As I'm relatively new to Erlang, is there an external source where I can monitor this issue?</div><div><span style="line-height:1.5;font-size:13.1999998092651px"><br></span></div><div><span style="line-height:1.5;font-size:13.1999998092651px">Or provide a fix:</span><br></div><div><span style="line-height:1.5;font-size:13.1999998092651px"><br></span></div><div><span style="font-size:13.1999998092651px;line-height:1.5">string:to_lower(erlang:integer_to_list(X,16)) </span><br></div>







<div><br></div><div>Kind regards,</div><div>Rik </div></div><br><div class="gmail_quote"><div dir="ltr">Op do 9 jul. 2015 om 11:44 schreef Raimo Niskanen <<a href="mailto:raimo%2Berlang-bugs@erix.ericsson.se">raimo+erlang-bugs@erix.ericsson.se</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jun 26, 2015 at 08:43:42PM +0000, Rik Ribbers wrote:<br>
> Hello,<br>
><br>
> I've been playing around with ipv6 in erlang and came across at first<br>
> strange behaviour in converting string to ipv6 and back<br>
><br>
> ~ --> erl<br>
> Erlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:4:4]<br>
> [async-threads:10] [hipe] [kernel-poll:false]<br>
><br>
> Eshell V7.0  (abort with ^G)<br>
> 1>inet:parse_address("2a00:d78::147:94:198:152:68").<br>
> {ok,{10752,3448,0,327,148,408,338,104}}<br>
> 2> inet:ntoa({10752,3448,0,327,148,408,338,104}).<br>
> "2A00:D78:0:147:94:198:152:68"<br>
><br>
> If you look closely you will see that there is an extra 0 introduced. This<br>
> is actually correct. In IETF RFC5952 section 4.2.2 states that a single 0<br>
> must not be shortened. This however introduces however the question is the<br>
> inet:parse_address is actually correct, however it is being friendly to its<br>
> caller...<br>
<br>
There is no ambiguity here so why not.<br>
<br>
><br>
> The real issue is however that the addresses are displayed in uppercase<br>
> which is simply wrong. As RFC5952 clearly states in section 4.3. There is<br>
> even Errata on this issue that states it must be in lower case.<br>
><br>
> The RFC can be found here <a href="https://tools.ietf.org/html/rfc5952" rel="noreferrer" target="_blank">https://tools.ietf.org/html/rfc5952</a><br>
<br>
Oh dear.  We'll probably have to fix that.<br>
<br>
To my defence I will say that the code is from November 2009 which predates<br>
that RFC and that it tries to follow RFC 4291 or maybe RFC 3513.  It also uses<br>
erlang:integer_to_list/2 that produces uppercase, just for the same reasons<br>
that the rejected Errata voices...<br>
<br>
Thank you for pointing this out.<br>
<br>
<br>
><br>
> Kind regards,<br>
> Rik Ribbers<br>
<br>
> _______________________________________________<br>
> erlang-bugs mailing list<br>
> <a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-bugs" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
<br>
<br>
--<br>
<br>
/ Raimo Niskanen, Erlang/OTP, Ericsson AB<br>
</blockquote></div>