mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Fix bug in Normalise Unicode operation: replace nfc by nfkc
This commit is contained in:
parent
d720a6b250
commit
738ee33959
2 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ class NormaliseUnicode extends Operation {
|
||||||
case "NFKD":
|
case "NFKD":
|
||||||
return unorm.nfkd(input);
|
return unorm.nfkd(input);
|
||||||
case "NFKC":
|
case "NFKC":
|
||||||
return unorm.nfc(input);
|
return unorm.nfkc(input);
|
||||||
default:
|
default:
|
||||||
throw new OperationError("Unknown Normalisation Form");
|
throw new OperationError("Unknown Normalisation Form");
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ TestRegister.addTests([
|
||||||
}, {
|
}, {
|
||||||
name: "Normalise Unicode - NFKC",
|
name: "Normalise Unicode - NFKC",
|
||||||
input: "\u00c7\u0043\u0327\u2160",
|
input: "\u00c7\u0043\u0327\u2160",
|
||||||
expectedMatch: /\u00C7\u00C7\u2160/,
|
expectedMatch: /\u00C7\u00C7I/,
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "Normalise Unicode",
|
op: "Normalise Unicode",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue