JuliaLang/julia — pull request #6546 by stevengj (2014-04-16 16:11:26+00:00)
Title: fix #6540: utf16(s) for binary data, etc.

This patch adds `utf16(s)` for binary data, an `is_valid_utf16(s)` function analogous to `is_valid_utf8`, and restricts `IOBuffer(s::String)` to `ByteString`s as discussed in #6540.