Changed to `#encode`, although I'm a paranoid about explicitly relying on the file encoding. Is it a reasonable assumption to always assume the file encoding marker will always be present?