http://qs321.pair.com?node_id=1230692


in reply to Re^3: truncate string to byte count
in thread truncate string to byte count

Tests 1 to 12 are incorrect because they don't provide UTF-8.

I think you're making assumptions about what the OP's input data looks like...

Update:

Tests 1 to 11 ... Replace ...

It is uncool to update a node in a way that renders replies confusing or meaningless.

Update 2: How about "is is uncool to make someone chase down all of your ninja edits and wonder when the ninja editing will be done." You made several other ninja edits (like this one) to your nodes and I had to update my replies several times while composing them.