Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 418 Bytes

File metadata and controls

13 lines (10 loc) · 418 Bytes

Encode and decode in Julia

The UnicodeExtras module provides the encode function, which accepts a string and returns an array of bytes in the specified encoding, and the decode function, which accepts an array of bytes in the specified encoding and returns a string.

using UnicodeExtras

utf16 = encode(str,   "UTF-16")
str   = decode(utf16, "UTF-16")