This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
uc(): Handle Greek YPOGEGRAMMENI
authorKarl Williamson <khw@khw-desktop.(none)>
Wed, 2 Jun 2010 21:07:29 +0000 (15:07 -0600)
committerRafael Garcia-Suarez <rgs@consttype.org>
Tue, 15 Jun 2010 10:30:19 +0000 (12:30 +0200)
commit4c8a458a2f2be4d98cd2b8873f15b800e9382262
treebb9bc2ce3e20932bebe27735f711ef3519c60a1f
parentcc70200b5f52ae10e2985e4d11670b3b76984b4d
uc(): Handle Greek YPOGEGRAMMENI

Unicode contains two context-sensitive case-changing rules.  This patch
enables one of them, dealing with the Greek YPOGEGRAMMENI.  The code had
been #ifdef'd out, so the changes here are more than what the diff
shows.  The reason it was #ifdef'd out was because more research was
needed to verify that it was correct, which I have now done, and think
it is.

The issue is we may just be uppercasing a portion of the context, so
don't have complete knowledge of what should be done.  This patch causes
us to move the ypogegrammeni to as far right as it should go, or to the
end of the context we know about, whichever comes first.  That's the
best we can do.  If it really should be moved further to the right,
there's no way we can do it, because the user has not called uc()
with the full information needed.  So, in all cases, this is better than
just leaving it where it was in the input.  Also, the applicable context
is limited to a logical character, that matched by /\X/, so if the user
is calling uc() on a subset of a logical character, it really is their
mistake.
pp.c
t/uni/upper.t