The usual way to send strings in this situation is to send an integer (encoded as you like) for the size of the string followed by this many bytes. You can save space, but still allow arbitrary sizes using the UTF-8- like scheme for this integer.
Roger Pate
source share