Add encoding support to save/load.