simplify encoding splitter and support whitespace inside encoded

@bf4 @jeremy @mikel