Created
November 15, 2017 21:54
-
-
Save chuckremes/0e3c9aeb04e01b5edd5f5795a83156eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
io = SyncIO::File.open(fd: fd, mode: mode, flags: flags) | |
# +io+ reads/writes bytes | |
file = IO::Transcoder.new(io: io, encoding: Encodings::UTF16LE) | |
string = file.gets | |
puts string.encoding # => UTF16LE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment