Fix error where only the first byte of a trailing UTF-8 character was output

This commit is contained in:
Mikko Ahlroth 2013-08-12 11:32:25 +03:00
parent c0596d30ad
commit 2c4c559544

View file

@ -2053,7 +2053,7 @@ defmodule ExCoder do
end
end
def decode(<< first :: utf8, rest :: binary >>), do: << first >> <> decode rest
def decode(str), do: String.first(str) <> decode String.slice str, 1, String.length str
def decode(numeric, :numericmode) when is_number numeric do