Subversion Repositories Kolibri OS

Rev

Rev 7749 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. char *unicode_tags[]={
  2. "nbsp",  " ",
  3. "#38",   " ",
  4. "#160",  " ",
  5.  
  6. "copy",  "(c)",
  7. "#169",  "(c)",
  8.  
  9. "trade", "[TM]",
  10.  
  11. "reg",   "(r)",
  12. "#174",  "(r)",
  13.  
  14. "bdquo", ",,",
  15.  
  16. "amp",   "&",
  17. "#38",   "&",
  18.  
  19. "lt",    "<",
  20. "#60",   "<",
  21.  
  22. "gt",    ">",
  23. "#62",   ">",
  24.  
  25. "minus", "-",
  26. "ndash", "-",
  27. "mdash", "-", //--
  28. "#8722", "-",
  29. "#8211", "-",
  30. "#151",  "-",
  31. "#149",  "-",
  32. "#9642", "-", //square in the middle of the line
  33.  
  34. "rsquo", "'",
  35. "#39",   "'",
  36. "#039",  "'",
  37. "#96",   "'",
  38. "#8217", "'",
  39.  
  40. "quot",  "\"",
  41. "#34",   "\"",
  42. "ldquo", "\"",
  43. "rdquo", "\"",
  44. "#8222", "\"",
  45. "#8221", "\"",
  46.  
  47. "laquo", "<<",
  48. "#171",  "<<",
  49. "raquo", ">>",
  50. "#187",  ">>",
  51.  
  52. "uarr",  "\24",
  53. "darr",  "\25",
  54. "rarr",  "\26",
  55. "larr",  "\27",
  56.  
  57. "#1028", "\242",
  58. "#1030", "I",
  59. "#1031", "\244",
  60.  
  61. "#8470", "N",
  62. "bull",  "\31", //âîîáùå çäåñü òî÷êà
  63. "percnt","%",
  64.  
  65. 0};
  66.  
  67.  
  68. unsigned char unicode_chars[] = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯àáâãäåæçèéêëìíîïðñh£\243i\105\244\0";
  69.  
  70. bool GetUnicodeSymbol(dword in_tag)
  71. {
  72.         int j, specia1040;
  73.        
  74.         for (j=0; unicode_tags[j]!=0; j+=2;)
  75.         {
  76.                 if (!strcmp(in_tag, unicode_tags[j]))
  77.                 {
  78.                         strcat(#line, unicode_tags[j+1]);
  79.                         return true;
  80.                 }
  81.         }
  82.  
  83.         specia1040 = atoi(in_tag + 1) - 1040;
  84.        
  85.         if (tag[1] == '1') && (specia1040>=0)
  86.         && (specia1040<=72) && (strlen(in_tag) == 5)
  87.         {
  88.                 if (strlen(#line)<sizeof(line)-2) {
  89.                         /*
  90.                         j = strlen(#line);
  91.                         line[j] = unicode_chars[specia1040];
  92.                         line[j+1] = EOS;
  93.                         */
  94.                         chrcat(#line, unicode_chars[specia1040]);
  95.                 }
  96.                 return true;
  97.         }
  98.  
  99.         return false;
  100. }
  101.