+2010-04-20 Damien Diederen <dd@crosstwine.com>
+
+ * Normalization.cs: The correct "checkType" argument to
+ Decompose() is NKD or NKFD when normalizing to NKC resp. NKFC.
+
+ * StringTest.cs: More NFC test cases.
+
2010-04-20 Damien Diederen <dd@crosstwine.com>
* Normalization.cs: Implement algorithmic Hangul composition.
private static string Compose (string source, int checkType)
{
StringBuilder sb = null;
- Decompose (source, ref sb, checkType);
+ // Decompose to NFD or NKFD depending on our target
+ Decompose (source, ref sb, checkType == 2 ? 3 : 1);
if (sb == null)
sb = Combine (source, 0, checkType);
else
Assert.AreEqual ("!\u116C".Normalize (NormalizationForm.FormC), "!\u116C", "#5");
Assert.AreEqual ("!\u116B\u11C2".Normalize (NormalizationForm.FormC), "!\u116B\u11C2", "#6");
}
+
+ [Test]
+ public void MoreNormalizeFormC ()
+ {
+ Assert.AreEqual ("\u1E0A\u0323".Normalize (NormalizationForm.FormC), "\u1E0C\u0307", "#1");
+ Assert.AreEqual ("\u0044\u0323\u0307".Normalize (NormalizationForm.FormC), "\u1E0C\u0307", "#2");
+ }
#endif
[Test]
public void Emptiness ()