hexagony icon indicating copy to clipboard operation
hexagony copied to clipboard

Problem with encoding

Open stasoid opened this issue 6 years ago • 0 comments

If file contains UTF-8 multibyte characters Hexagony behaves differently on Linux and Windows because default encoding on Linux is UTF-8, and on Windows it's something else.

On Linux it treats those characters atomically, on Windows each byte is treated separately.

As I/O is done byte-wise I assume interpreter on Linux behaves not as intended.

It can be fixed by reading in binary mode, something like File.open(ARGV[0],"rb").read instead of ARGF.read in interpreter.rb.

stasoid avatar Aug 20 '18 20:08 stasoid