Support Encoding Configuration

In response to @Valem's merge request, I have added the ability to
support file encoding.