ASCII Jam Problem: HTML Entities
note: the info on this page is incorrect. The page remains here only as a historical record. Thanks to
Yuri Khan
(https://plus.google.com/+YuriKhan/posts)
for correction.
here's a example of computing complexity induced by limited number of characters in a char set.
in articles on Unicode, Unicode chars may be marked up like this:
<mark class="unicode">α</mark>
in web browser, it shows like this α.
and i have a JavaScript file that lets user hover mouse over and show a balloon of the char's name and codepoint. For example, see: Unicode: Math Symbols π² ∞ ∫ .
The JavaScript code works by grabbing the first char inside the markup, then query Unicode database.
Now, here's the problem. If your char is the LESS-THAN SIGN, you have to use HTML entities. So, it looks like this:
<mark class="unicode"><</mark>
But now the JavaScript won't work anymore. Because it'll simply display the first char, which is “&”. You could fix the JavaScript by first checking, but there you have it, complexity induced by ASCII jam.
For many more examples of the ASCII Jam problem, see: Problems of Symbol Congestion in Computer Languages; ASCII Jam vs Unicode .