It is returning a length of 350 because the string contains 350 characters.
To verify this, select the text and paste it into an Unicode editor (e.g. with Notepad++ choose File - New, Encoding - UCS-2 Little Endian, and paste the text).
Within Notepad++, it will look like (shortened, there will be 349 dots after the 'a').
a····
Saving the file and opening it with a hex editor shows the code points (again shortened):
FF FE 61 00 0D 03 0D 03 0D 03
where
FEFF
= BOM (Byte Order Mark)
0061
= Letter 'a'
030D
= Combining vertical line above
So you have a string containg the letter 'a' and 349 combining vertical line above characters. Combining characters are not shown after the preceding one but combined with it. Because you have 349 of them, there will be 349 above the 'a'.
This is an example with one to three of them:
a̍ a̍̍ a̍̍̍
So there is no surprise that your string is not accepted by most forms. The intention of such combining characters is to use them once for the rare cases when there is no already combined Unicode character.