Bruce Momjian <bruce(at)momjian(dot)us> writes:
> But the logic doesn't make sense. Why would two bytes be any different
> than one? I assumed you would just remove all trailing high-bit bytes
> and stop and the first non-high-bit byte.
To take the most obvious counterexample: what if the name contains
*only* high-bit-set bytes? In any case, this logic must achieve
the same effect as the original encoding-aware truncation, which
will not have removed more than it absolutely had to.
regards, tom lane