From 89f26ed1c9f2bd7fbc6c2e7561d6325379d701a3 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Sun, 23 May 2010 23:35:42 -0700 Subject: [PATCH] autodetection actually works now --- src/jsx.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsx.erl b/src/jsx.erl index c0d800b..5edac9c 100644 --- a/src/jsx.erl +++ b/src/jsx.erl @@ -52,7 +52,7 @@ init_callbacks({M, S}) when is_atom(M) -> init_callbacks({F, S}) when is_function(F) -> {F, S}. -detect_encoding(<> = Stream, Callbacks, Opts) -> +detect_encoding(<> = Stream, Callbacks, Opts) -> Encoding = case [A, B, C, D] of [0, 0, 0, _] -> utf32b ; [0, _, 0, _] -> utf16b