Add encoding option to spdata fileformat