encoder: remove trailing white-space