Newlines should not be part of the allowed characters, as they aren't part of the alphabet and are illegal characters according to the RFC. They do allow line feeds to break up encoded strings, but that is not officially part of the encoding.

I explicitly did not add simple checks like if the entries are one character long and if they are a string or whatnot, because this method isn't public.