📄 lycharsets.c
字号:
#include "HTUtils.h"#include "tcp.h"#include "HTCJK.h"#include "HTMLDTD.h"#include "LYGlobalDefs.h"#include "UCMap.h"#include "UCDefs.h"#include "LYCharSets.h"#include "LYCharUtils.h"#include "HTFont.h"#include "GridText.h"#include "LYCurses.h"#include "LYStrings.h"#include "LYexit.h"#include "LYLeaks.h"extern BOOL HTPassEightBitRaw;extern BOOL HTPassEightBitNum;extern BOOL HTPassHighCtrlRaw;extern BOOL HTPassHighCtrlNum;extern HTCJKlang HTCJK;PUBLIC HTkcode kanji_code = NOKANJI;PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE;extern void UCInit NOARGS;extern int UCInitialized;PUBLIC int LYNumCharsets = 0; /* Will be initialized later by UC_Register. *//* * INSTRUCTIONS for adding new character sets which do not have * Unicode tables. * * Currently we only declare some charset's properties here * (such as MIME names, etc.), it does not include real mapping. * * [We hope you need not correct/add old-style mapping * as in ISO_LATIN1[] or SevenBitApproximations[] any more - * it works now via new chartrans mechanism, but kept for compatibility only: * we should cleanup the stuff, but this is not so easy...] * * There is a place marked "Add your new character sets HERE" in this file. * Make up a character set and add it in the same * style as the ISO_LATIN1 set below, giving it a unique name. * * Add the name of the set to LYCharSets. * Similarly add the appropriate information to the tables below: * LYchar_set_names, LYCharSet_UC, LYlowest_eightbit. * These 4 tables all MUST have the same order. * (And this is the order you will see in Lynx Options Menu, * which is why few unicode-based charsets are listed here). * *//* Entity values -- for ISO Latin 1 local representation**** This MUST match exactly the table referred to in the DTD!*/PRIVATE char * ISO_Latin1[] = { "\306", /* capital AE diphthong (ligature) (Æ) - AElig */ "\301", /* capital A, acute accent (Á) - Aacute */ "\302", /* capital A, circumflex accent (Â) - Acirc */ "\300", /* capital A, grave accent (À) - Agrave */ "\305", /* capital A, ring - Aring (Å) */ "\303", /* capital A, tilde - Atilde (Ã) */ "\304", /* capital A, dieresis or umlaut mark (Ä) - Auml */ "\307", /* capital C, cedilla - Ccedil (Ç) */ "\320", /* capital Eth or D with stroke (Ð) - Dstrok */ "\320", /* capital Eth, Icelandic (Ð) - ETH */ "\311", /* capital E, acute accent (É) - Eacute */ "\312", /* capital E, circumflex accent (Ê) - Ecirc */ "\310", /* capital E, grave accent (È) - Egrave */ "\313", /* capital E, dieresis or umlaut mark (Ë) - Euml */ "\315", /* capital I, acute accent (Í) - Iacute */ "\316", /* capital I, circumflex accent (Î) - Icirc */ "\314", /* capital I, grave accent (È) - Igrave */ "\317", /* capital I, dieresis or umlaut mark (Ï) - Iuml */ "\321", /* capital N, tilde (Ñ) - Ntilde */ "\323", /* capital O, acute accent (Ó) - Oacute */ "\324", /* capital O, circumflex accent (Ô) - Ocirc */ "\322", /* capital O, grave accent (Ò) - Ograve */ "\330", /* capital O, slash (Ø) - Oslash */ "\325", /* capital O, tilde (Õ) - Otilde */ "\326", /* capital O, dieresis or umlaut mark (Ö) - Ouml */ "\336", /* capital THORN, Icelandic (Þ) - THORN */ "\332", /* capital U, acute accent (Ú) - Uacute */ "\333", /* capital U, circumflex accent (Û) - Ucirc */ "\331", /* capital U, grave accent (Ù) - Ugrave */ "\334", /* capital U, dieresis or umlaut mark (Ü) - Uuml */ "\335", /* capital Y, acute accent (Ý) - Yacute */ "\341", /* small a, acute accent (á) - aacute */ "\342", /* small a, circumflex accent (â) - acirc */ "\264", /* spacing acute (´) - acute */ "\346", /* small ae diphthong (ligature) (æ) - aelig */ "\340", /* small a, grave accent (à) - agrave */ "\046", /* ampersand (&) - amp */ "\345", /* small a, ring (å) - aring */ "\343", /* small a, tilde (ã) - atilde */ "\344", /* small a, dieresis or umlaut mark (ä) - auml */ "\246", /* broken vertical bar (¦) - brkbar */ "\246", /* broken vertical bar (¦) - brvbar */ "\347", /* small c, cedilla (ç) - ccedil */ "\270", /* spacing cedilla (¸) - cedil */ "\242", /* cent sign (¢) - cent */ "\251", /* copyright sign (©) - copy */ "\244", /* currency sign (¤) - curren */ "\260", /* degree sign (°) - deg */ "\250", /* spacing dieresis (¨) - die */ "\367", /* division sign (÷) - divide */ "\351", /* small e, acute accent (é) - eacute */ "\352", /* small e, circumflex accent (ê) - ecirc */ "\350", /* small e, grave accent (è) - egrave */ "-", /* dash the width of emsp - emdash */ "\002", /* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */ "\360", /* small eth, Icelandic (ð) - eth */ "\353", /* small e, dieresis or umlaut mark (ë) - euml */ "\275", /* fraction 1/2 (½) - frac12 */ "\274", /* fraction 1/4 (¼) - frac14 */ "\276", /* fraction 3/4 (¾) - frac34 */ "\076", /* greater than (>) - gt */ "\257", /* spacing macron (¯) - hibar */ "\355", /* small i, acute accent (í) - iacute */ "\356", /* small i, circumflex accent (î) - icirc */ "\241", /* inverted exclamation mark (¡) - iexcl */ "\354", /* small i, grave accent (ì) - igrave */ "\277", /* inverted question mark (¿) - iquest */ "\357", /* small i, dieresis or umlaut mark (ï) - iuml */ "\253", /* angle quotation mark, left («) - laquo */ "\074", /* less than (<) - lt */ "\257", /* spacing macron (¯) - macr */ "-", /* dash the width of emsp - mdash */ "\265", /* micro sign (µ) - micro */ "\267", /* middle dot (·) - middot */ "\001", /* nbsp non-breaking space NEVER CHANGE THIS - nbsp */ "-", /* dash the width of ensp - ndash */ "\254", /* negation sign (¬) - not */ "\361", /* small n, tilde (ñ) - ntilde */ "\363", /* small o, acute accent (ó) - oacute */ "\364", /* small o, circumflex accent (ô) - ocirc */ "\362", /* small o, grave accent (ò) - ograve */ "\252", /* feminine ordinal indicator (ª) - ordf */ "\272", /* masculine ordinal indicator (º) - ordm */ "\370", /* small o, slash (ø) - oslash */ "\365", /* small o, tilde (õ) - otilde */ "\366", /* small o, dieresis or umlaut mark (ö) - ouml */ "\266", /* paragraph sign (¶) - para */ "\261", /* plus-or-minus sign (±) - plusmn */ "\243", /* pound sign (£) - pound */ "\042", /* quote '"' (") - quot */ "\273", /* angle quotation mark, right (») - raquo */ "\256", /* circled R registered sign (®) - reg */ "\247", /* section sign (§) - sect */ "\007", /* soft hyphen (­) NEVER CHANGE THIS - shy */ "\271", /* superscript 1 (¹) - sup1 */ "\262", /* superscript 2 (²) - sup2 */ "\263", /* superscript 3 (³) - sup3 */ "\337", /* small sharp s, German (sz ligature) (ß) - szlig */ "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "\376", /* small thorn, Icelandic (þ) - thorn */ "\327", /* multiplication sign (×) - times */ "(TM)", /* circled TM trade mark sign (™) - trade */ "\372", /* small u, acute accent (ú) - uacute */ "\373", /* small u, circumflex accent (û) - ucirc */ "\371", /* small u, grave accent (ù) - ugrave */ "\250", /* spacing dieresis (¨) - uml */ "\374", /* small u, dieresis or umlaut mark (ü) - uuml */ "\375", /* small y, acute accent (ý) - yacute */ "\245", /* yen sign (¥) - yen */ "\377", /* small y, dieresis or umlaut mark (ÿ) - yuml */};/* Entity values -- 7 bit character approximations**** This MUST match exactly the table referred to in the DTD!*/PUBLIC char * SevenBitApproximations[] = { "AE", /* capital AE diphthong (ligature) (Æ) - AElig */ "A", /* capital A, acute accent (Á) - Aacute */ "A", /* capital A, circumflex accent (Â) - Acirc */ "A", /* capital A, grave accent (À) - Agrave */ "A", /* capital A, ring - Aring (Å) */ "A", /* capital A, tilde - Atilde (Ã) */#ifdef LY_UMLAUT "Ae", /* capital A, dieresis or umlaut mark (Ä) - Auml*/#else "A", /* capital A, dieresis or umlaut mark (Ä) - Auml*/#endif /* LY_UMLAUT */ "C", /* capital C, cedilla (Ç) - Ccedil */ "Dj", /* capital D with stroke (Ð) - Dstrok */ "DH", /* capital Eth, Icelandic (Ð) - ETH */ "E", /* capital E, acute accent (É) - Eacute */ "E", /* capital E, circumflex accent (Ê) - Ecirc */ "E", /* capital E, grave accent (È) - Egrave */ "E", /* capital E, dieresis or umlaut mark (Ë) - Euml */ "I", /* capital I, acute accent (Í) - Iacute */ "I", /* capital I, circumflex accent (Î) - Icirc */ "I", /* capital I, grave accent (Ì) - Igrave */ "I", /* capital I, dieresis or umlaut mark (Ï) - Iuml */ "N", /* capital N, tilde - Ntilde (Ñ) */ "O", /* capital O, acute accent (Ó) - Oacute */ "O", /* capital O, circumflex accent (Ô) - Ocirc */ "O", /* capital O, grave accent (Ò) - Ograve */ "O", /* capital O, slash (Ø) - Oslash */ "O", /* capital O, tilde (Õ) - Otilde */#ifdef LY_UMLAUT "Oe", /* capital O, dieresis or umlaut mark (Ö) - Ouml */#else "O", /* capital O, dieresis or umlaut mark (Ö) - Ouml */#endif /* LY_UMLAUT */ "P", /* capital THORN, Icelandic (Þ) - THORN */ "U", /* capital U, acute accent (Ú) - Uacute */ "U", /* capital U, circumflex accent (Û) - Ucirc */ "U", /* capital U, grave accent (Ù) - Ugrave */#ifdef LY_UMLAUT "Ue", /* capital U, dieresis or umlaut mark (Ü) - Uuml */#else "U", /* capital U, dieresis or umlaut mark (Ü) - Uuml */#endif /* LY_UMLAUT */ "Y", /* capital Y, acute accent (Ý) - Yacute */ "a", /* small a, acute accent (á) - aacute */ "a", /* small a, circumflex accent (â) - acirc */ "'", /* spacing acute (´) - acute */ "ae", /* small ae diphthong (ligature) (æ) - aelig */ "`a", /* small a, grave accent (è) - agrave */ "&", /* ampersand (&) - amp */ "a", /* small a, ring (å) - aring */ "a", /* small a, tilde (ã) - atilde */#ifdef LY_UMLAUT "ae", /* small a, dieresis or umlaut mark (ä) - auml */#else "a", /* small a, dieresis or umlaut mark (ä) - auml */#endif /* LY_UMLAUT */ "|", /* broken vertical bar (¦) - brkbar */ "|", /* broken vertical bar (¦) - brvbar */ "c", /* small c, cedilla (ç) - ccedil */ ",", /* spacing cedilla (¸) - cedil */ "-c-", /* cent sign (¢) - cent */ "(c)", /* copyright sign (©) - copy */ "CUR", /* currency sign (¤) - curren */ "DEG", /* degree sign (°) - deg */ "\042", /* spacing dieresis (¨) - die */ "/", /* division sign (÷) - divide */ "e", /* small e, acute accent (é) - eacute */ "e", /* small e, circumflex accent (ê) - ecirc */ "e", /* small e, grave accent (è) - egrave */ "-", /* dash the width of emsp - emdash */ "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ "dh", /* small eth, Icelandic eth (ð) */ "e", /* small e, dieresis or umlaut mark (ë) - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ " 3/4", /* fraction 3/4 (¾) - frac34 */ ">", /* greater than (>) - gt */ "-", /* spacing macron (¯) - hibar */ "i", /* small i, acute accent (í) - iacute */ "i", /* small i, circumflex accent (î) - icirc*/ "!", /* inverted exclamation mark (¡) - iexcl */ "`i", /* small i, grave accent (ì) - igrave */ "?", /* inverted question mark (¿) - iquest */ "i", /* small i, dieresis or umlaut mark (ï) - iuml */ "<<", /* angle quotation mark, left («) - laquo */ "<", /* less than - lt (<) */ "-", /* spacing macron (¯) - macr */ "-", /* dash the width of emsp - mdash */ "u", /* micro sign (µ) - micro */ ".", /* middle dot (·) - middot */ "\001", /* nbsp non-breaking space NEVER CHANGE THIS - nbsp */ "-", /* dash the width of ensp - ndash */ "NOT", /* negation sign (¬) - not */ "n", /* small n, tilde (ñ) - ntilde */ "o", /* small o, acute accent (ó) - oacute */ "o", /* small o, circumflex accent (ô) - ocirc */ "o", /* small o, grave accent (ò) - ograve */ "-a", /* feminine ordinal indicator (ª) - ordf */ "-o", /* masculine ordinal indicator (º) - ordm */ "o", /* small o, slash (ø) - oslash */ "o", /* small o, tilde (õ) - otilde */#ifdef LY_UMLAUT "oe", /* small o, dieresis or umlaut mark (ö) - ouml */#else "o", /* small o, dieresis or umlaut mark (ö) - ouml */#endif /* LY_UMLAUT */ "P:", /* paragraph sign (¶) - para */ "+-", /* plus-or-minus sign (±) - plusmn */ "-L-", /* pound sign (£) - pound */ "\"", /* quote '"' (") - quot */ ">>", /* angle quotation mark, right (») - raquo */ "(R)", /* circled R registered sign (®) - reg */ "S:", /* section sign (§) - sect */ "\007", /* soft hyphen (­) NEVER CHANGE THIS - shy */ "^1", /* superscript 1 (¹) - sup1 */ "^2", /* superscript 2 (²) - sup2 */ "^3", /* superscript 3 (³) - sup3 */ "ss", /* small sharp s, German (sz ligature) (ß) - szlig */ "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic (þ) - thorn */ "*", /* multiplication sign (×) - times */ "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent (ú) - uacute */ "u", /* small u, circumflex accent (û) - ucirc */ "u", /* small u, grave accent (ù) - ugrave */ "\042", /* spacing dieresis (¨) - uml */#ifdef LY_UMLAUT "ue", /* small u, dieresis or umlaut mark (ü) - uuml */#else "u", /* small u, dieresis or umlaut mark (ü) - uuml */#endif /* LY_UMLAUT */ "y", /* small y, acute accent (ý) - yacute */ "YEN", /* yen sign (¥) - yen */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -