Subversion Repositories Kolibri OS

Rev

Rev 7282 | 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
 
68
byte unicode_chars[] = "h\243i\105\244\0";
69
 
70
unsigned char GetUnicodeSymbol()
71
{
72
	int j;
73
 
74
	for (j=0; unicode_tags[j]!=0; j+=2;)
75
	{
76
		if (!strcmp(#tag, unicode_tags[j]))
77
		{
78
			strcat(#line, unicode_tags[j+1]);
79
			return NULL;
80
		}
81
	}
82
 
83
	j = atoi(#tag + 1) - 1040;
84
	if (tag[1] == '1') && (j>=0) && (j<=72) && (strlen(#tag) == 5)
85
	{
86
		return unicode_chars[j];
87
	}
88
 
89
	strcat(#line,#tag); //    ,   - 
90
	return NULL;
91
}