added a default encoding when no encoding is found