public void TestLatin_GreekTranslit() { IcuTranslitEncConverter conv = new IcuTranslitEncConverter(); string lhsEncoding = "UNICODE"; string rhsEncoding = "UNICODE"; ConvType convType = ConvType.Unicode_to_from_Unicode; int procFlags = (int)ProcessTypeFlags.ICUTransliteration; conv.Initialize("Latin-Greek", "Latin-Greek", ref lhsEncoding, ref rhsEncoding, ref convType, ref procFlags, 0, 0, false); string output = conv.Convert(m_latinInput); Assert.AreEqual(m_greekOutput, output, "Latin-Greek transliterator should work properly!"); }
public void TestGreek_LatinTranslit() { IcuTranslitEncConverter conv = new IcuTranslitEncConverter(); string lhsEncoding = "UNICODE"; string rhsEncoding = "UNICODE"; ConvType convType = ConvType.Unicode_to_from_Unicode; int procFlags = (int)ProcessTypeFlags.ICUTransliteration; conv.Initialize("Greek-Latin", "Greek-Latin", ref lhsEncoding, ref rhsEncoding, ref convType, ref procFlags, 0, 0, false); string output = conv.Convert(m_greekInput); // var xxx = output.ToCharArray(); // if (xxx != null) // { // Console.WriteLine("Latin output characters"); // for (int i = 0; i < xxx.Length; ++i) // { // char ch = xxx[i]; // Console.WriteLine("Latin[{0}] = '{1}' = {2:d5} = {2:x4}", i, ch, (int)ch); // } // } Assert.AreEqual(m_latinOutput, output, "Latin-Greek transliterator should work properly!"); }