Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
7752 leency 1
char *unicode_symbols[]={
7757 leency 2
"quot","\"",
3
"amp", "&",
4
"lt",  "<",
5
"gt",  ">",
6
"#183","\31",   "middot", "\31",
7752 leency 7
"#149","-",
8
"#151","-",
8439 leency 9
"#160"," ",     "nbsp", " ",   "emsp", " ",
7752 leency 10
"#169","(c)",   "copy", "(c)",
11
"#171","<<",    "laquo","<<",
12
"#174","(r)",   "reg",  "(r)",
13
"#187",">>",    "raquo",">>",
4411 leency 14
 
15
"trade", "[TM]",
16
"bdquo", ",,",
17
 
18
"minus", "-",
19
"ndash", "-",
20
"mdash", "-", //--
21
 
22
"rsquo", "'",
7758 leency 23
"sect", "#",
4411 leency 24
 
7758 leency 25
"ensp",    " ",
26
"emsp13",  " ",
27
"emsp14",  " ",
28
"numsp",   " ",
29
"puncsp",  " ",
30
"thinsp",  " ",
31
 
7752 leency 32
"#1028", "\242",
33
"#1030", "I",
34
"#1031", "\244",
4411 leency 35
 
7752 leency 36
"#8211", "-",
8350 leency 37
"#8212", "-",
7752 leency 38
"#8217", "'",
7757 leency 39
"#8220", "\"",
7752 leency 40
"#8222", "\"", "ldquo", "\"",
41
"#8221", "\"", "rdquo", "\"",
42
"#8470", "N",
43
"#8722", "-",
44
"#9642", "-", //square in the middle of the line
7758 leency 45
"#9658", ">",
46
"#9660", "v",
8439 leency 47
"#10094", "<",
48
"#10095", ">",
7757 leency 49
"#65122", "+",
4411 leency 50
 
8365 leency 51
"#8594", "->",
52
 
8381 leency 53
"uarr",  "^",
54
"darr",  "v",
55
"rarr",  "->",
56
"larr",  "<-",
4411 leency 57
 
7752 leency 58
"bull",  "\31",
4411 leency 59
"percnt","%",
60
 
7752 leency 61
"#xfeff", "",
62
 
7758 leency 63
"times", "x",
64
"lowast","*",
65
 
4411 leency 66
0};
67
 
68
 
7750 leency 69
unsigned char unicode_chars[] = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏเแโใไๅๆ็่้๊๋์ํ๎๏๐๑hฃ\243i\105\244\0";
4411 leency 70
 
7757 leency 71
bool GetUnicodeSymbol(dword _line, in_tag, size)
4411 leency 72
{
7757 leency 73
	int j;
74
	int code;
4411 leency 75
 
7752 leency 76
	for (j=0; unicode_symbols[j]!=0; j+=2;)
4411 leency 77
	{
7752 leency 78
		if (!strcmp(in_tag, unicode_symbols[j]))
4411 leency 79
		{
7757 leency 80
			strncat(_line, unicode_symbols[j+1], size);
7749 leency 81
			return true;
4411 leency 82
		}
83
	}
7749 leency 84
 
7757 leency 85
	if (ESBYTE[in_tag]=='#')
4411 leency 86
	{
7757 leency 87
		code = atoi(in_tag + 1);
88
		if (code>=0) && (code<=255)	{
89
			chrncat(_line, code, size); //NOT ALL ASCII CODES IN KOLIBRI ARE COMPATABLE WITH STANDARDS
90
			return true;
7750 leency 91
		}
7757 leency 92
		if (code>=1040) && (code<=1040+72) {
93
			chrncat(_line, unicode_chars[code-1040], size);
94
			return true;
95
		}
4411 leency 96
	}
7749 leency 97
 
98
	return false;
4411 leency 99
}