deprecated get/setEnconding method