On Wed, Apr 24, 2019 at 1:28 AM John Cowan <xxxxxx@ccil.org> wrote:

On Tue, Apr 23, 2019 at 11:02 AM Alex Shinn <xxxxxx@gmail.com> wrote:

(7) How are the various "trimmed" procedures supposed to be
implemented in case ANSI escape sequences or Unicode combining
characters are present? (For example, when trimming happens to the
left, the suggested algorithm of taking the longest output does not
yield the correct result.)

In general we can imagine arbitrary compositions that don't work well
together.  Trimming in particular is problematic.  How should downcase
folding work on a non-trailing Σ (sigma) which is trimmed to become
trailing?  

It should not become final.  Thus the word φίλος 'beloved' followed by
a sentence-ending period ends with a final sigma, whereas the
abbreviation φιλοσ. for φιλοσοφία 'philosophy' continues to end with a non-final sigma.

Yes, but you see we can't implement this.  If we downcase first and then
trim, the downcasing logic can't know what the trimmed result will be.

--
Alex