From 2c4c559544c076f33c3615cd14711b04e1d30d55 Mon Sep 17 00:00:00 2001 From: Mikko Ahlroth Date: Mon, 12 Aug 2013 11:32:25 +0300 Subject: [PATCH] Fix error where only the first byte of a trailing UTF-8 character was output --- lib/excoder.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/excoder.ex b/lib/excoder.ex index 6f2b67a..6d70e90 100644 --- a/lib/excoder.ex +++ b/lib/excoder.ex @@ -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