summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw1gz <w1gz@noreply.com>2017-02-26 20:12:49 +0100
committerw1gz <w1gz@noreply.com>2017-02-26 21:18:31 +0100
commit3edd97247e4644593a8c98202b6cccf71d6ccfff (patch)
treea946f76aebf36ed336d71fe7d2e56374d08908be
parentMerge pull request #60 from w1gz/unicode-bug-in-get-args (diff)
Convert our unicode list to binary instead of relying on the latin1 option of
`unicode.characters_to_binary/1`.
-rw-r--r--lib/exirc/utils.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/exirc/utils.ex b/lib/exirc/utils.ex
index 0ef392e..b2a79cd 100644
--- a/lib/exirc/utils.ex
+++ b/lib/exirc/utils.ex
@@ -75,7 +75,8 @@ defmodule ExIrc.Utils do
|> Enum.reverse
|> Enum.filter(fn arg -> arg != [] end)
|> Enum.map(&trim_crlf/1)
- |> Enum.map(&(:unicode.characters_to_binary(&1, :unicode, :latin1)))
+ |> Enum.map(&:binary.list_to_bin/1)
+ |> Enum.map(&:unicode.characters_to_binary/1)
post_process(%{msg | args: args})
end