An amazing fact that is nevertheless impossible to use to pick up chicks.
Neither ladies nor gents will ever be racing to bed you for knowing it and mentioning it conversationally at a party, but after many tedious hours today working on the new website for the Legal Clinic, I was able to work out something of fundamental importance. At least, of fundamental importance to people who work on websites that:
- Use javascript
- Use javascript variables that must be given text strings in the code in order to display things like titles on the website; and
- Don't come with instructions.
And here it is: when you need to enter international symbols in blocks of text, say in French (because you're putting up a website for "Canada's University," which is mighty bilingual), and it is
absolutely essential to put those dreaded "illegal characters" (like semicolons; apostrophes; ampersands; slashes; and the rest!) in because French is crammed with apostrophes, you
don't need to shoot yourself in the head, painting the wall of your office a delicate shade of you despite the fact that normal HTML code-friendly commands like ' won't work either, because they
also use illegal characters (and of course, this step was the first thing I tried when I realized after an hour and a half of
trying everything that the reason my index page wasn't working was because illegal characters were in there somewhere).
What you do is, make it an "escape character" by adding a slash in front of the offending illegal character so that Java realizes you're referring to a block of text and not interfering with a line of coding. Thus, evil, illegal, no good:
'Clinique juridique communautaire de l'université d'Ottawa'
Becomes okey dokey:
'Clinique juridique communautaire de l\'université d\'Ottawa'
Useless information, I know, but it took me
hours to figure it out, and I needed to say so. Goddamn University-mandated templates!