remove deprecation warning from encodingFrom