Encode the string as UTF-8

To use encoding other than UTF-8 to parse a file, set the IO Encoding

    File.open(filename, "r:ASCII-8BIT").bdecode