From 142d4434e405c51e6bb200f10a2bad046b595f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?= Date: Sun, 8 Aug 2021 18:29:12 +0200 Subject: [PATCH] #148: icu_regex_traits::translate_nocase doesn't use case-folding In translate_nocase replace u_tolower by u_foldCase(c, U_FOLD_CASE_DEFAULT) suitable for single codeunit case folding --- include/boost/regex/v4/icu.hpp | 2 +- include/boost/regex/v5/icu.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/v4/icu.hpp b/include/boost/regex/v4/icu.hpp index 9724b0f8..7e70f57e 100644 --- a/include/boost/regex/v4/icu.hpp +++ b/include/boost/regex/v4/icu.hpp @@ -187,7 +187,7 @@ namespace boost { } char_type translate_nocase(char_type c) const { - return ::u_tolower(c); + return ::u_foldCase(c, U_FOLD_CASE_DEFAULT); } char_type translate(char_type c, bool icase) const { diff --git a/include/boost/regex/v5/icu.hpp b/include/boost/regex/v5/icu.hpp index a9264965..f172553d 100644 --- a/include/boost/regex/v5/icu.hpp +++ b/include/boost/regex/v5/icu.hpp @@ -161,7 +161,7 @@ public: } char_type translate_nocase(char_type c) const { - return ::u_tolower(c); + return ::u_foldCase(c, U_FOLD_CASE_DEFAULT); } char_type translate(char_type c, bool icase) const {