in reply to Re: truncate string to byte count
in thread truncate string to byte count
This utf8cut is buggy. It can give suffers from The Unicode Bug. It's output is dependent on how a string is stored internally, which is a bug.
For example, passing a string consisting of characters 80 and 80 with a second argument of 2 will can result in "\x80" (correct) and "\x80\x80" (incorrect).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: truncate string to byte count
by haukex (Archbishop) on Feb 28, 2019 at 20:54 UTC | |
by ikegami (Patriarch) on Feb 28, 2019 at 21:09 UTC |