summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-02 05:18:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-02 05:18:45 +0000
commitb4e400f9f0f3998e635cdce0c2d2e790cbe42caa (patch)
treeb638c44345271b6f0f9020e6ccc262fb9c21b4c5 /utf8.c
parent18e548ce1d77b525add551f80ef335f852cf9389 (diff)
downloadperl-b4e400f9f0f3998e635cdce0c2d2e790cbe42caa.tar.gz
Unicode: add ToFold mapping. Not used yet; but basically
a more useful mapping for caseless aka case-ignoring than doing either lc($a) eq lc($b) or uc($a) eq uc($b); the full algorithm for creating the foldings uses equivalence classes, see http://www.unicode.org/unicode/reports/tr21/ Hopefully this feature will be used in //i. (The folding tables were introduced by #12689.) p4raw-id: //depot/perl@12807
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/utf8.c b/utf8.c
index ac90a38283..768db078b8 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1223,21 +1223,28 @@ UV
Perl_to_utf8_upper(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp)
{
return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
- &PL_utf8_toupper, "ToUpper", "utf8::ToSpecUpper");
+ &PL_utf8_toupper, "ToUpper", "utf8::ToSpecUpper");
}
UV
Perl_to_utf8_title(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp)
{
return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
- &PL_utf8_totitle, "ToTitle", "utf8::ToSpecTitle");
+ &PL_utf8_totitle, "ToTitle", "utf8::ToSpecTitle");
}
UV
Perl_to_utf8_lower(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp)
{
return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
- &PL_utf8_tolower, "ToLower", "utf8::ToSpecLower");
+ &PL_utf8_tolower, "ToLower", "utf8::ToSpecLower");
+}
+
+UV
+Perl_to_utf8_fold(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp)
+{
+ return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
+ &PL_utf8_tofold, "ToFold", "utf8::ToSpecFold");
}
/* a "swash" is a swatch hash */