[erlang-questions] Downcase Accented characters
Sun Oct 21 22:12:09 CEST 2012
On Sun, October 21, 2012 3:39 pm, Roberto Ostinelli wrote:
> For the records, this just works..
> start() ->
> Unicode = list_to_binary("â-HOpe@âº.EXAMple.com/Myâ¤"),
> Result = list_to_binary(string:to_lower(binary_to_list(Unicode))),
> "â-hope@âº.example.com/myâ¤" = binary_to_list(Result).
> any downsides I'm not seeing?
For what it's worth,
** exception error: bad argument
in function list_to_binary/1
I get that on my system if any of the special characters (∞,
☺, ❤) are present (R15B02 on Debian 6.0.6 and OSX 10.7.2,
both built from source). So you might need to be careful with that
More information about the erlang-questions