Rosetta Code:Village Pump/Syntax highlighting: Difference between revisions

m
→‎ALGOL 68, AutoGeSHi: Unicode characters to HTML entity codes, for better compat
(Dotted blue border.)
m (→‎ALGOL 68, AutoGeSHi: Unicode characters to HTML entity codes, for better compat)
Line 673:
BTW: The operators: '≤' and '≥' can be done in html as '≤' and '≥' eg '≤' and '≥';
 
There are a few of others: ne: &ne;, cent: &cent; pound: &pound; deg: &deg;, and: &and;, or: &or;, not: &not;, lceil: &lceil;, lfloor: &lfloor;, times: &times;, divide: &divide; larr: &larr;, rarr: &rarr;, uarr: &uarr;, darr: &darr;, and perp: &perp; <!-- The Algol 68 Report used alefsym: &alefsym;, "&#x226E;", "&#x226F;" and &#x2112; http://en.wikipedia.org/wiki/Van_Wijngaarden_grammar -->. But no HTML entities for □, ○, ⎩, ⎧ (Unicode 5.1) and "⏨" (decimal exponentiation - Unicode 5.2).
 
Detecting all the HTML entity defs (http://php.net/manual/en/function.htmlentities.php) is probably the easiest way of doing things.
 
Trivia: Standard Algol 60 required sup: &sup;, equiv: &equiv;, "&#x2423;" and "&#x23E8;" (decimal exponentiation - Unicode 5.2); The Soviet Algol compiler - used for the Buran Space Shuttle reentry software - even had the character: loz: &loz;, together with support for °&#xB0;, &#x2205;, ±&#xB1; and &#x2207; ... I could never figure out what this [http://en.wikipedia.org/wiki/Behenian_fixed_stars#Table_of_Behenian_Stars diamond &loz;] character was used for!!! The Germans also included the unusual "<font size=5>&#x16ED;</font>" (iron/runic cross), I'm not convinced it was used for multiplication. Probably something used for something mundane like printing train time tables, you would have to be German to understand. :-)
 
More Trivia: Most of the HTML entities appear to have arrived via Adobe fonts from an IBM Selectric typewriter font ball that was popular prior to ASCII 69 becoming a mandated US standard. Some of the HTML entities are fairly weird.
Anonymous user