From 100fc44bc950ace32d4dd4c2e0fd444cbbac7d95 Mon Sep 17 00:00:00 2001 From: Kristianmitk Date: Mon, 12 Jul 2021 19:28:07 +0200 Subject: [PATCH 1/4] normalize the unicode sequence before looping over characters --- .../src/lib/fake-input/fake-input.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts b/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts index a0848e7..ffd7890 100755 --- a/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts +++ b/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts @@ -89,7 +89,13 @@ export class FakeInputComponent implements OnInit, OnDestroy { ngOnInit() { this.registerInputField(); this.chars = this.initialText - .split('').map(char => { + // We want the text to use canonical composition of special symbols like + // german umlaute and avoid treating the combining diaeresis character + // separately. + .normalize("NFC") + .split('') + .map(char => { + console.log(char) return { char }; From 94b83897a4f64fd3a0ecdce5b2177c39183208e9 Mon Sep 17 00:00:00 2001 From: Kristianmitk Date: Mon, 12 Jul 2021 19:29:48 +0200 Subject: [PATCH 2/4] remove console log --- .../angular-keyboard/src/lib/fake-input/fake-input.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts b/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts index ffd7890..e30e446 100755 --- a/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts +++ b/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts @@ -95,7 +95,6 @@ export class FakeInputComponent implements OnInit, OnDestroy { .normalize("NFC") .split('') .map(char => { - console.log(char) return { char }; From a152aa4625456c88fc34b2e40920f6941c590215 Mon Sep 17 00:00:00 2001 From: Kristianmitk Date: Tue, 13 Jul 2021 09:36:58 +0200 Subject: [PATCH 3/4] bump version --- projects/angular-keyboard/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/angular-keyboard/package.json b/projects/angular-keyboard/package.json index 46577b7..e372430 100644 --- a/projects/angular-keyboard/package.json +++ b/projects/angular-keyboard/package.json @@ -1,4 +1,4 @@ { "name": "@taskbase/angular-keyboard", - "version": "0.0.10" -} + "version": "0.0.11" +} \ No newline at end of file From 8b82c5664f78d1f1ba853ebd9b30e5c7fa6f19b0 Mon Sep 17 00:00:00 2001 From: Kristianmitk Date: Tue, 13 Jul 2021 10:08:57 +0200 Subject: [PATCH 4/4] use nfkc --- .../angular-keyboard/src/lib/fake-input/fake-input.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts b/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts index e30e446..6ca7c0d 100755 --- a/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts +++ b/projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts @@ -92,7 +92,7 @@ export class FakeInputComponent implements OnInit, OnDestroy { // We want the text to use canonical composition of special symbols like // german umlaute and avoid treating the combining diaeresis character // separately. - .normalize("NFC") + .normalize("NFKC") .split('') .map(char => { return {