Encode the list into one string using length-prefixing so any characters (including delimiters) are safe.
For each string x, append len(x) + '#' + x. To decode, read digits until # to get the length, then take that many characters as the next string.
The decoder never guesses boundaries; it uses explicit lengths, so embedded symbols don’t break parsing.
Encode the list into one string using length-prefixing so any characters (including delimiters) are safe.
For each string x, append len(x) + '#' + x. To decode, read digits until # to get the length, then take that many characters as the next string.
The decoder never guesses boundaries; it uses explicit lengths, so embedded symbols don’t break parsing.