actually encode to UTF-8 when input charset is non UTF-8 + basic specs

I decided to go with an early return structure. I am not usually a fan unless the return condition(s) are at the beginning of the method and doing so removes unnecessary nesting. IMHO it is easier to read, but this is subjective and debatable :P