Handle encodings, no matter the Ruby version, Operating System and installed libraries