If encoding is null it defaults to the application charset?