Rev 8365 | Rev 8439 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8365 | Rev 8381 | ||
---|---|---|---|
1 | char *unicode_symbols[]={ |
1 | char *unicode_symbols[]={ |
2 | "quot","\"", |
2 | "quot","\"", |
3 | "amp", "&", |
3 | "amp", "&", |
4 | "lt", "<", |
4 | "lt", "<", |
5 | "gt", ">", |
5 | "gt", ">", |
6 | "#183","\31", "middot", "\31", |
6 | "#183","\31", "middot", "\31", |
7 | "#149","-", |
7 | "#149","-", |
8 | "#151","-", |
8 | "#151","-", |
9 | "#160"," ", "nbsp", " ", |
9 | "#160"," ", "nbsp", " ", |
10 | "#169","(c)", "copy", "(c)", |
10 | "#169","(c)", "copy", "(c)", |
11 | "#171","<<", "laquo","<<", |
11 | "#171","<<", "laquo","<<", |
12 | "#174","(r)", "reg", "(r)", |
12 | "#174","(r)", "reg", "(r)", |
13 | "#187",">>", "raquo",">>", |
13 | "#187",">>", "raquo",">>", |
14 | 14 | ||
15 | "trade", "[TM]", |
15 | "trade", "[TM]", |
16 | "bdquo", ",,", |
16 | "bdquo", ",,", |
17 | 17 | ||
18 | "minus", "-", |
18 | "minus", "-", |
19 | "ndash", "-", |
19 | "ndash", "-", |
20 | "mdash", "-", //-- |
20 | "mdash", "-", //-- |
21 | 21 | ||
22 | "rsquo", "'", |
22 | "rsquo", "'", |
23 | "sect", "#", |
23 | "sect", "#", |
24 | 24 | ||
25 | "ensp", " ", |
25 | "ensp", " ", |
26 | "emsp13", " ", |
26 | "emsp13", " ", |
27 | "emsp14", " ", |
27 | "emsp14", " ", |
28 | "numsp", " ", |
28 | "numsp", " ", |
29 | "puncsp", " ", |
29 | "puncsp", " ", |
30 | "thinsp", " ", |
30 | "thinsp", " ", |
31 | 31 | ||
32 | "#1028", "\242", |
32 | "#1028", "\242", |
33 | "#1030", "I", |
33 | "#1030", "I", |
34 | "#1031", "\244", |
34 | "#1031", "\244", |
35 | 35 | ||
36 | "#8211", "-", |
36 | "#8211", "-", |
37 | "#8212", "-", |
37 | "#8212", "-", |
38 | "#8217", "'", |
38 | "#8217", "'", |
39 | "#8220", "\"", |
39 | "#8220", "\"", |
40 | "#8222", "\"", "ldquo", "\"", |
40 | "#8222", "\"", "ldquo", "\"", |
41 | "#8221", "\"", "rdquo", "\"", |
41 | "#8221", "\"", "rdquo", "\"", |
42 | "#8470", "N", |
42 | "#8470", "N", |
43 | "#8722", "-", |
43 | "#8722", "-", |
44 | "#9642", "-", //square in the middle of the line |
44 | "#9642", "-", //square in the middle of the line |
45 | "#9658", ">", |
45 | "#9658", ">", |
46 | "#9660", "v", |
46 | "#9660", "v", |
47 | "#65122", "+", |
47 | "#65122", "+", |
48 | 48 | ||
49 | "#8594", "->", |
49 | "#8594", "->", |
50 | 50 | ||
51 | "uarr", "\24", |
51 | "uarr", "^", |
52 | "darr", "\25", |
52 | "darr", "v", |
53 | "rarr", "\26", |
53 | "rarr", "->", |
54 | "larr", "\27", |
54 | "larr", "<-", |
55 | 55 | ||
56 | "bull", "\31", |
56 | "bull", "\31", |
57 | "percnt","%", |
57 | "percnt","%", |
58 | 58 | ||
59 | "#xfeff", "", |
59 | "#xfeff", "", |
60 | 60 | ||
61 | "times", "x", |
61 | "times", "x", |
62 | "lowast","*", |
62 | "lowast","*", |
63 | 63 | ||
64 | 0}; |
64 | 0}; |
65 | 65 | ||
66 | 66 | ||
67 | unsigned char unicode_chars[] = " ¡¢£¤¥¦§¨©ª«¬®¯àáâãäåæçèéêëìíîïðñh£\243i\105\244\0"; |
67 | unsigned char unicode_chars[] = " ¡¢£¤¥¦§¨©ª«¬®¯àáâãäåæçèéêëìíîïðñh£\243i\105\244\0"; |
68 | 68 | ||
69 | bool GetUnicodeSymbol(dword _line, in_tag, size) |
69 | bool GetUnicodeSymbol(dword _line, in_tag, size) |
70 | { |
70 | { |
71 | int j; |
71 | int j; |
72 | int code; |
72 | int code; |
73 | 73 | ||
74 | for (j=0; unicode_symbols[j]!=0; j+=2;) |
74 | for (j=0; unicode_symbols[j]!=0; j+=2;) |
75 | { |
75 | { |
76 | if (!strcmp(in_tag, unicode_symbols[j])) |
76 | if (!strcmp(in_tag, unicode_symbols[j])) |
77 | { |
77 | { |
78 | strncat(_line, unicode_symbols[j+1], size); |
78 | strncat(_line, unicode_symbols[j+1], size); |
79 | return true; |
79 | return true; |
80 | } |
80 | } |
81 | } |
81 | } |
82 | 82 | ||
83 | if (ESBYTE[in_tag]=='#') |
83 | if (ESBYTE[in_tag]=='#') |
84 | { |
84 | { |
85 | code = atoi(in_tag + 1); |
85 | code = atoi(in_tag + 1); |
86 | if (code>=0) && (code<=255) { |
86 | if (code>=0) && (code<=255) { |
87 | chrncat(_line, code, size); //NOT ALL ASCII CODES IN KOLIBRI ARE COMPATABLE WITH STANDARDS |
87 | chrncat(_line, code, size); //NOT ALL ASCII CODES IN KOLIBRI ARE COMPATABLE WITH STANDARDS |
88 | return true; |
88 | return true; |
89 | } |
89 | } |
90 | if (code>=1040) && (code<=1040+72) { |
90 | if (code>=1040) && (code<=1040+72) { |
91 | chrncat(_line, unicode_chars[code-1040], size); |
91 | chrncat(_line, unicode_chars[code-1040], size); |
92 | return true; |
92 | return true; |
93 | } |
93 | } |
94 | } |
94 | } |
95 | 95 | ||
96 | return false; |
96 | return false; |
97 | }=1040+72)>=255)>", |
97 | }=1040+72)>=255)>-",>", |
98 | "#174","(r)",><", |
98 | "#174","(r)",><", |
99 | "#174","(r)",>",><",>", |
99 | "#174","(r)",>",><",>", |
100 | "gt",> |
100 | "gt",> |