Support encoding changing. Caller may choose the encodings for reading and saving the file.
:lipstick: fix styles for review.
Merge pull request #36 from ForNeVeR/encoding-support-pr

Support encoding changing