Detected at one of my clients.
They use polish special characters like ść
The length in TextRowProtocol is set to 2 for each of those characters so 4 in our example.
With this the current code
results into an ArrayOutOfBoundsError at the substring() call.
I added a test case and a quick fix for it.
Travis fails on environment issues. Nothing to do with my change. I can not rerun them....