Subversion Repositories Kolibri OS

Rev

Rev 7752 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7752 Rev 7757
Line 1... Line 1...
1
char *unicode_symbols[]={
1
char *unicode_symbols[]={
2
"#32", " ",      
2
"quot","\"",
3
"#34", "\"",     "quot","\"",
-
 
4
"#38", "&",      "amp", "&",
-
 
5
"#39", "'",
3
"amp", "&",
6
"#039","'",
-
 
7
"#60", "<",      "lt",  "<",
-
 
8
"#62", ">",      "gt",  ">",
-
 
9
"#91", "[",
4
"lt",  "<",
10
"#93", "]",
5
"gt",  ">",
11
"#96", "'",
6
"#183","\31",   "middot", "\31", 
12
"#149","-",
7
"#149","-",
13
"#151","-",
8
"#151","-",
14
"#160"," ",     "nbsp", " ",
9
"#160"," ",     "nbsp", " ",
15
"#169","(c)",   "copy", "(c)",
10
"#169","(c)",   "copy", "(c)",
16
"#171","<<",    "laquo","<<",
11
"#171","<<",    "laquo","<<",
Line 30... Line 25...
30
"#1030", "I",
25
"#1030", "I",
31
"#1031", "\244",
26
"#1031", "\244",
Line 32... Line 27...
32
 
27
 
33
"#8211", "-",
28
"#8211", "-",
-
 
29
"#8217", "'",
34
"#8217", "'",
30
"#8220", "\"",
35
"#8222", "\"", "ldquo", "\"",
31
"#8222", "\"", "ldquo", "\"",
36
"#8221", "\"", "rdquo", "\"",
32
"#8221", "\"", "rdquo", "\"",
37
"#8470", "N",
33
"#8470", "N",
38
"#8722", "-",
34
"#8722", "-",
-
 
35
"#9642", "-", //square in the middle of the line
Line 39... Line 36...
39
"#9642", "-", //square in the middle of the line
36
"#65122", "+",
40
 
37
 
41
"uarr",  "\24",
38
"uarr",  "\24",
42
"darr",  "\25",
39
"darr",  "\25",
Line 51... Line 48...
51
0}; 
48
0}; 
Line 52... Line 49...
52
 
49
 
Line 53... Line 50...
53
 
50
 
54
unsigned char unicode_chars[] = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯àáâãäåæçèéêëìíîïðñh£\243i\105\244\0";
51
unsigned char unicode_chars[] = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯àáâãäåæçèéêëìíîïðñh£\243i\105\244\0";
-
 
52
 
55
 
53
bool GetUnicodeSymbol(dword _line, in_tag, size)
Line 56... Line 54...
56
bool GetUnicodeSymbol(dword in_tag)
54
{
57
{
55
	int j;
58
	int j, specia1040;
56
	int code;
59
	
57
	
60
	for (j=0; unicode_symbols[j]!=0; j+=2;) 
58
	for (j=0; unicode_symbols[j]!=0; j+=2;) 
61
	{
59
	{
62
		if (!strcmp(in_tag, unicode_symbols[j]))
60
		if (!strcmp(in_tag, unicode_symbols[j]))
63
		{
61
		{
Line 64... Line -...
64
			strcat(#line, unicode_symbols[j+1]);
-
 
65
			return true;
-
 
66
		}
62
			strncat(_line, unicode_symbols[j+1], size);
67
	}
-
 
68
 
63
			return true;
69
	specia1040 = atoi(in_tag + 1) - 1040;
64
		}
70
	
-
 
71
	if (ESBYTE[in_tag+1] == '1') && (specia1040>=0) 
65
	}
72
	&& (specia1040<=72) && (strlen(in_tag) == 5)
66
 
73
	{
67
	if (ESBYTE[in_tag]=='#') 
74
		if (strlen(#line)
-
 
75
			/*
-
 
76
			j = strlen(#line);
68
	{
-
 
69
		code = atoi(in_tag + 1);
-
 
70
		if (code>=0) && (code<=255)	{
77
			line[j] = unicode_chars[specia1040];
71
			chrncat(_line, code, size); //NOT ALL ASCII CODES IN KOLIBRI ARE COMPATABLE WITH STANDARDS
78
			line[j+1] = EOS;
72
			return true;
-
 
73
		}
Line 79... Line 74...
79
			*/
74
		if (code>=1040) && (code<=1040+72) {
80
			chrcat(#line, unicode_chars[specia1040]);
75
			chrncat(_line, unicode_chars[code-1040], size);