Subversion Repositories Kolibri OS

Rev

Rev 7749 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4411 leency 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",  "-",
7032 leency 32
"#9642", "-", //square in the middle of the line
4411 leency 33
 
34
"rsquo", "'",
35
"#39",   "'",
7742 leency 36
"#039",  "'",
4411 leency 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",
7282 leency 62
"bull",  "\31", //  
4411 leency 63
"percnt","%",
64
 
65
0};
66
 
67
 
7750 leency 68
unsigned char unicode_chars[] = "h\243i\105\244\0";
4411 leency 69
 
7749 leency 70
bool GetUnicodeSymbol(dword in_tag)
4411 leency 71
{
7750 leency 72
	int j, specia1040;
4411 leency 73
 
74
	for (j=0; unicode_tags[j]!=0; j+=2;)
75
	{
7749 leency 76
		if (!strcmp(in_tag, unicode_tags[j]))
4411 leency 77
		{
78
			strcat(#line, unicode_tags[j+1]);
7749 leency 79
			return true;
4411 leency 80
		}
81
	}
7749 leency 82
 
7750 leency 83
	specia1040 = atoi(in_tag + 1) - 1040;
84
 
85
	if (tag[1] == '1') && (specia1040>=0)
86
	&& (specia1040<=72) && (strlen(in_tag) == 5)
4411 leency 87
	{
7750 leency 88
		if (strlen(#line)
89
			/*
90
			j = strlen(#line);
91
			line[j] = unicode_chars[specia1040];
92
			line[j+1] = EOS;
93
			*/
94
			chrcat(#line, unicode_chars[specia1040]);
95
		}
7749 leency 96
		return true;
4411 leency 97
	}
7749 leency 98
 
99
	return false;
4411 leency 100
}