diff --git a/common/web/types/src/ldml-keyboard/pattern-parser.ts b/common/web/types/src/ldml-keyboard/pattern-parser.ts index 419807095d..fe10b7deb0 100644 --- a/common/web/types/src/ldml-keyboard/pattern-parser.ts +++ b/common/web/types/src/ldml-keyboard/pattern-parser.ts @@ -145,6 +145,10 @@ export class MarkerParser { * @returns the normalized string */ public static nfd_markers(s: string, forMatch?: boolean) : string { + if(true) { + const m : MarkerMap = []; + return this.nfd_markers_segment(s, m, forMatch); + } // Note: parallel to ldml::normalize_nfd_markers() if(!s) return s; /** Accumulate output normalized string */ diff --git a/core/src/ldml/ldml_markers.cpp b/core/src/ldml/ldml_markers.cpp index a3e31fd0df..15f7fbd2d8 100644 --- a/core/src/ldml/ldml_markers.cpp +++ b/core/src/ldml/ldml_markers.cpp @@ -219,6 +219,11 @@ bool normalize_nfd_markers(std::u32string &str, marker_encoding encoding) { // quick check - don't bother if the string is empty if(str.empty()) return true; +#if 1 + marker_map m; + return normalize_nfd_markers_segment(str, m, encoding); +#else + // we're going to need an NFD normalizer UErrorCode status = U_ZERO_ERROR; const icu::Normalizer2 *nfd = icu::Normalizer2::getNFDInstance(status); @@ -297,6 +302,7 @@ bool normalize_nfd_markers(std::u32string &str, marker_encoding encoding) { // update output string str = out; return true; +#endif } // TODO-LDML: cleanup