Looking at https://core.telegram.org/type/string it's unclear to me whether the length discussed here is the UTF-8 string length, or the number of bytes the string has been encoded into.
On second reading it seems that it is the number of bytes:
then L bytes of the string followed by 0 to 3 characters containing 0