2020-03-26 01:12:32 +01:00
|
|
|
|
char *unicode_symbols[]={
|
2020-03-29 12:57:14 +02:00
|
|
|
|
"quot","\"",
|
|
|
|
|
"amp", "&",
|
|
|
|
|
"lt", "<",
|
|
|
|
|
"gt", ">",
|
|
|
|
|
"#183","\31", "middot", "\31",
|
2020-03-26 01:12:32 +01:00
|
|
|
|
"#149","-",
|
|
|
|
|
"#151","-",
|
|
|
|
|
"#160"," ", "nbsp", " ",
|
|
|
|
|
"#169","(c)", "copy", "(c)",
|
|
|
|
|
"#171","<<", "laquo","<<",
|
|
|
|
|
"#174","(r)", "reg", "(r)",
|
|
|
|
|
"#187",">>", "raquo",">>",
|
2013-12-27 00:36:17 +01:00
|
|
|
|
|
|
|
|
|
"trade", "[TM]",
|
|
|
|
|
"bdquo", ",,",
|
|
|
|
|
|
|
|
|
|
"minus", "-",
|
|
|
|
|
"ndash", "-",
|
|
|
|
|
"mdash", "-", //--
|
|
|
|
|
|
|
|
|
|
"rsquo", "'",
|
2020-03-30 23:29:52 +02:00
|
|
|
|
"sect", "#",
|
|
|
|
|
|
|
|
|
|
"ensp", " ",
|
|
|
|
|
"emsp13", " ",
|
|
|
|
|
"emsp14", " ",
|
|
|
|
|
"numsp", " ",
|
|
|
|
|
"puncsp", " ",
|
|
|
|
|
"thinsp", " ",
|
2013-12-27 00:36:17 +01:00
|
|
|
|
|
2020-03-26 01:12:32 +01:00
|
|
|
|
"#1028", "\242",
|
|
|
|
|
"#1030", "I",
|
|
|
|
|
"#1031", "\244",
|
2013-12-27 00:36:17 +01:00
|
|
|
|
|
2020-03-26 01:12:32 +01:00
|
|
|
|
"#8211", "-",
|
|
|
|
|
"#8217", "'",
|
2020-03-29 12:57:14 +02:00
|
|
|
|
"#8220", "\"",
|
2020-03-26 01:12:32 +01:00
|
|
|
|
"#8222", "\"", "ldquo", "\"",
|
|
|
|
|
"#8221", "\"", "rdquo", "\"",
|
|
|
|
|
"#8470", "N",
|
|
|
|
|
"#8722", "-",
|
|
|
|
|
"#9642", "-", //square in the middle of the line
|
2020-03-30 23:29:52 +02:00
|
|
|
|
"#9658", ">",
|
|
|
|
|
"#9660", "v",
|
2020-03-29 12:57:14 +02:00
|
|
|
|
"#65122", "+",
|
2013-12-27 00:36:17 +01:00
|
|
|
|
|
|
|
|
|
"uarr", "\24",
|
|
|
|
|
"darr", "\25",
|
|
|
|
|
"rarr", "\26",
|
|
|
|
|
"larr", "\27",
|
|
|
|
|
|
2020-03-26 01:12:32 +01:00
|
|
|
|
"bull", "\31",
|
2013-12-27 00:36:17 +01:00
|
|
|
|
"percnt","%",
|
|
|
|
|
|
2020-03-26 01:12:32 +01:00
|
|
|
|
"#xfeff", "",
|
|
|
|
|
|
2020-03-30 23:29:52 +02:00
|
|
|
|
"times", "x",
|
|
|
|
|
"lowast","*",
|
|
|
|
|
|
2013-12-27 00:36:17 +01:00
|
|
|
|
0};
|
|
|
|
|
|
|
|
|
|
|
2020-03-25 01:18:19 +01:00
|
|
|
|
unsigned char unicode_chars[] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>h<EFBFBD>\243i\105\244\0";
|
2013-12-27 00:36:17 +01:00
|
|
|
|
|
2020-03-29 12:57:14 +02:00
|
|
|
|
bool GetUnicodeSymbol(dword _line, in_tag, size)
|
2013-12-27 00:36:17 +01:00
|
|
|
|
{
|
2020-03-29 12:57:14 +02:00
|
|
|
|
int j;
|
|
|
|
|
int code;
|
2013-12-27 00:36:17 +01:00
|
|
|
|
|
2020-03-26 01:12:32 +01:00
|
|
|
|
for (j=0; unicode_symbols[j]!=0; j+=2;)
|
2013-12-27 00:36:17 +01:00
|
|
|
|
{
|
2020-03-26 01:12:32 +01:00
|
|
|
|
if (!strcmp(in_tag, unicode_symbols[j]))
|
2013-12-27 00:36:17 +01:00
|
|
|
|
{
|
2020-03-29 12:57:14 +02:00
|
|
|
|
strncat(_line, unicode_symbols[j+1], size);
|
2020-03-23 16:53:56 +01:00
|
|
|
|
return true;
|
2013-12-27 00:36:17 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-03-23 16:53:56 +01:00
|
|
|
|
|
2020-03-29 12:57:14 +02:00
|
|
|
|
if (ESBYTE[in_tag]=='#')
|
2013-12-27 00:36:17 +01:00
|
|
|
|
{
|
2020-03-29 12:57:14 +02:00
|
|
|
|
code = atoi(in_tag + 1);
|
|
|
|
|
if (code>=0) && (code<=255) {
|
|
|
|
|
chrncat(_line, code, size); //NOT ALL ASCII CODES IN KOLIBRI ARE COMPATABLE WITH STANDARDS
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (code>=1040) && (code<=1040+72) {
|
|
|
|
|
chrncat(_line, unicode_chars[code-1040], size);
|
|
|
|
|
return true;
|
2020-03-25 01:18:19 +01:00
|
|
|
|
}
|
2013-12-27 00:36:17 +01:00
|
|
|
|
}
|
2020-03-23 16:53:56 +01:00
|
|
|
|
|
|
|
|
|
return false;
|
2013-12-27 00:36:17 +01:00
|
|
|
|
}
|