We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello!
The error:
** (FunctionClauseError) no function clause matching in String.contains?/2 (elixir) lib/string.ex:1767: String.contains?({:incomplete, "⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐", <<226>>}, "example") (exirc) lib/exirc/client.ex:721: ExIrc.Client.handle_data/2 (stdlib) gen_server.erl:601: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:667: :gen_server.handle_msg/5 (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
I have investigated it a little bit and think that the problem is here:
|> Enum.map(fn(s) -> case String.valid?(s) do true -> :unicode.characters_to_binary(s) false -> :unicode.characters_to_binary(s, :latin1, :unicode) end end)
https://github.com/bitwalker/exirc/blob/master/lib/exirc/utils.ex#L81
From the erlang doc:
characters_to_binary Result = binary() | {error, binary(), RestData} | {incomplete, binary(), binary()}
http://erlang.org/doc/man/unicode.html#characters_to_binary-1
So basically we need to handle the situation when the string is incomplete, maybe a fallback to empty string would be enough?
I'm not sure about the proper solution, any ideas?
Thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
The error:
I have investigated it a little bit and think that the problem is here:
https://github.com/bitwalker/exirc/blob/master/lib/exirc/utils.ex#L81
From the erlang doc:
http://erlang.org/doc/man/unicode.html#characters_to_binary-1
So basically we need to handle the situation when the string is incomplete, maybe a fallback to empty string would be enough?
I'm not sure about the proper solution, any ideas?
Thank you!
The text was updated successfully, but these errors were encountered: