Changeset 6146


Ignore:
Timestamp:
Aug 13, 2018, 8:59:25 AM (6 weeks ago)
Author:
cameron
Message:

Ensure that casefolds are returned in NFD form

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/Unicode/decomposition.cpp

    r6142 r6146  
    132132        for (codepoint_t cp = lo_codepoint(i); cp <= hi_codepoint(i); cp++) {
    133133            std::u32string dms = conv.from_bytes(caseFoldObj->GetStringValue(cp));
    134             RE * dm = u32string2re(dms);
    135             if (Seq * s = dyn_cast<Seq>(dm)) {
     134            RE * dm = NFD_RE(u32string2re(dms));
     135            if (CC * nfd_cc = dyn_cast<CC>(dm)) {
     136                finalCC = makeCC(finalCC, nfd_cc);
     137            } else if (Seq * s = dyn_cast<Seq>(dm)) {
    136138                if (s->size() == 1) {
    137139                    finalCC = makeCC(finalCC, cast<CC>(s->front()));
Note: See TracChangeset for help on using the changeset viewer.