I'm working my way up to binary pattern matching across a TCP connection.

The relationship between the number of bytes a character uses to it's String.length is not always equal (UTF-8 variable encoding)

iex(53)> String.length("é")
1
iex(54)> IO.inspect("é", binaries: :as_binary)
<<195, 169>>
"é"

Comments