autodetection actually works now
This commit is contained in:
parent
d777717062
commit
89f26ed1c9
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ init_callbacks({M, S}) when is_atom(M) ->
|
||||||
init_callbacks({F, S}) when is_function(F) ->
|
init_callbacks({F, S}) when is_function(F) ->
|
||||||
{F, S}.
|
{F, S}.
|
||||||
|
|
||||||
detect_encoding(<<A:1, B:1, C:1, D:1, _/binary>> = Stream, Callbacks, Opts) ->
|
detect_encoding(<<A:8, B:8, C:8, D:8, _/binary>> = Stream, Callbacks, Opts) ->
|
||||||
Encoding = case [A, B, C, D] of
|
Encoding = case [A, B, C, D] of
|
||||||
[0, 0, 0, _] -> utf32b
|
[0, 0, 0, _] -> utf32b
|
||||||
; [0, _, 0, _] -> utf16b
|
; [0, _, 0, _] -> utf16b
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue