Subversion Repositories Kolibri OS

Rev

Rev 8350 | Rev 8381 | 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","-",
9
"#160"," ",     "nbsp", " ",
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",
7757 leency 47
"#65122", "+",
4411 leency 48
 
8365 leency 49
"#8594", "->",
50
 
4411 leency 51
"uarr",  "\24",
52
"darr",  "\25",
53
"rarr",  "\26",
54
"larr",  "\27",
55
 
7752 leency 56
"bull",  "\31",
4411 leency 57
"percnt","%",
58
 
7752 leency 59
"#xfeff", "",
60
 
7758 leency 61
"times", "x",
62
"lowast","*",
63
 
4411 leency 64
0};
65
 
66
 
7750 leency 67
unsigned char unicode_chars[] = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏเแโใไๅๆ็่้๊๋์ํ๎๏๐๑hฃ\243i\105\244\0";
4411 leency 68
 
7757 leency 69
bool GetUnicodeSymbol(dword _line, in_tag, size)
4411 leency 70
{
7757 leency 71
	int j;
72
	int code;
4411 leency 73
 
7752 leency 74
	for (j=0; unicode_symbols[j]!=0; j+=2;)
4411 leency 75
	{
7752 leency 76
		if (!strcmp(in_tag, unicode_symbols[j]))
4411 leency 77
		{
7757 leency 78
			strncat(_line, unicode_symbols[j+1], size);
7749 leency 79
			return true;
4411 leency 80
		}
81
	}
7749 leency 82
 
7757 leency 83
	if (ESBYTE[in_tag]=='#')
4411 leency 84
	{
7757 leency 85
		code = atoi(in_tag + 1);
86
		if (code>=0) && (code<=255)	{
87
			chrncat(_line, code, size); //NOT ALL ASCII CODES IN KOLIBRI ARE COMPATABLE WITH STANDARDS
88
			return true;
7750 leency 89
		}
7757 leency 90
		if (code>=1040) && (code<=1040+72) {
91
			chrncat(_line, unicode_chars[code-1040], size);
92
			return true;
93
		}
4411 leency 94
	}
7749 leency 95
 
96
	return false;
4411 leency 97
}