Fixes for encoding problesm with fromInputStream()
Fixes for encoding problesm with fromFile()