For the records, this just works..<div><br></div><div><div><font face="courier new, monospace">start() -></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">       </span>Unicode = list_to_binary("∞-HOpe@☺.EXAMple.com/My❤"),</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">  </span>Result = list_to_binary(string:to_lower(binary_to_list(Unicode))),</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">  </span>"∞-hope@☺.<a href="http://example.com/my">example.com/my</a>❤" = binary_to_list(Result).</font></div>
<div><br></div><div>any downsides I'm not seeing?</div><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 12:25 PM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Loïc,<div><br></div><div>did you happen to benchmark it? Would that be better/faster than a simple <font face="courier new, monospace">list_to_binary(string:to_lower(binary_to_list(Bin)))</font>?<div>
<div class="h5"><br><br><div class="gmail_quote">
On Sun, Oct 21, 2012 at 12:18 PM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>On 10/21/2012 09:14 PM, Roberto Ostinelli wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear list,<br>
<br>
I've a binary string which includes accented characters and unicode,<br>
that i need to downcase.<br>
<br>
Is my real best option here to convert everything to list and downcase that?<br>
</blockquote>
<br></div></div>
Your current best option is ux_string:to_lower/1 from the ux library which will properly lower all characters, not just A-Z.<br>
<br>
Should be at <a href="https://github.com/erlang-unicode/ux" target="_blank">https://github.com/erlang-<u></u>unicode/ux</a><span><font color="#888888"><br>
<br>
-- <br>
Loďc Hoguin<br>
Erlang Cowboy<br>
Nine Nines<br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>