ArabicTable.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Collections.Generic;
  3. namespace I2.Loc
  4. {
  5. internal class ArabicTable
  6. {
  7. private ArabicTable()
  8. {
  9. ArabicTable.mapList = new List<ArabicMapping>();
  10. ArabicTable.mapList.Add(new ArabicMapping(1569, 65152));
  11. ArabicTable.mapList.Add(new ArabicMapping(1575, 65165));
  12. ArabicTable.mapList.Add(new ArabicMapping(1571, 65155));
  13. ArabicTable.mapList.Add(new ArabicMapping(1572, 65157));
  14. ArabicTable.mapList.Add(new ArabicMapping(1573, 65159));
  15. ArabicTable.mapList.Add(new ArabicMapping(1609, 64508));
  16. ArabicTable.mapList.Add(new ArabicMapping(1574, 65161));
  17. ArabicTable.mapList.Add(new ArabicMapping(1576, 65167));
  18. ArabicTable.mapList.Add(new ArabicMapping(1578, 65173));
  19. ArabicTable.mapList.Add(new ArabicMapping(1579, 65177));
  20. ArabicTable.mapList.Add(new ArabicMapping(1580, 65181));
  21. ArabicTable.mapList.Add(new ArabicMapping(1581, 65185));
  22. ArabicTable.mapList.Add(new ArabicMapping(1582, 65189));
  23. ArabicTable.mapList.Add(new ArabicMapping(1583, 65193));
  24. ArabicTable.mapList.Add(new ArabicMapping(1584, 65195));
  25. ArabicTable.mapList.Add(new ArabicMapping(1585, 65197));
  26. ArabicTable.mapList.Add(new ArabicMapping(1586, 65199));
  27. ArabicTable.mapList.Add(new ArabicMapping(1587, 65201));
  28. ArabicTable.mapList.Add(new ArabicMapping(1588, 65205));
  29. ArabicTable.mapList.Add(new ArabicMapping(1589, 65209));
  30. ArabicTable.mapList.Add(new ArabicMapping(1590, 65213));
  31. ArabicTable.mapList.Add(new ArabicMapping(1591, 65217));
  32. ArabicTable.mapList.Add(new ArabicMapping(1592, 65221));
  33. ArabicTable.mapList.Add(new ArabicMapping(1593, 65225));
  34. ArabicTable.mapList.Add(new ArabicMapping(1594, 65229));
  35. ArabicTable.mapList.Add(new ArabicMapping(1601, 65233));
  36. ArabicTable.mapList.Add(new ArabicMapping(1602, 65237));
  37. ArabicTable.mapList.Add(new ArabicMapping(1603, 65241));
  38. ArabicTable.mapList.Add(new ArabicMapping(1604, 65245));
  39. ArabicTable.mapList.Add(new ArabicMapping(1605, 65249));
  40. ArabicTable.mapList.Add(new ArabicMapping(1606, 65253));
  41. ArabicTable.mapList.Add(new ArabicMapping(1607, 65257));
  42. ArabicTable.mapList.Add(new ArabicMapping(1608, 65261));
  43. ArabicTable.mapList.Add(new ArabicMapping(1610, 65265));
  44. ArabicTable.mapList.Add(new ArabicMapping(1570, 65153));
  45. ArabicTable.mapList.Add(new ArabicMapping(1577, 65171));
  46. ArabicTable.mapList.Add(new ArabicMapping(1662, 64342));
  47. ArabicTable.mapList.Add(new ArabicMapping(1670, 64378));
  48. ArabicTable.mapList.Add(new ArabicMapping(1688, 64394));
  49. ArabicTable.mapList.Add(new ArabicMapping(1711, 64402));
  50. ArabicTable.mapList.Add(new ArabicMapping(1705, 64398));
  51. }
  52. internal static ArabicTable ArabicMapper
  53. {
  54. get
  55. {
  56. if (ArabicTable.arabicMapper == null)
  57. {
  58. ArabicTable.arabicMapper = new ArabicTable();
  59. }
  60. return ArabicTable.arabicMapper;
  61. }
  62. }
  63. internal int Convert(int toBeConverted)
  64. {
  65. foreach (ArabicMapping arabicMapping in ArabicTable.mapList)
  66. {
  67. if (arabicMapping.from == toBeConverted)
  68. {
  69. return arabicMapping.to;
  70. }
  71. }
  72. return toBeConverted;
  73. }
  74. private static List<ArabicMapping> mapList;
  75. private static ArabicTable arabicMapper;
  76. }
  77. }