2004-11-01

Unicode madness

Taking into account the unexpected temporal shift in the early hours of the morning (the clocks going back), I woke up in the afternoon today.

I was looking at Unicode.org and I discovered how to achieve matched “double” and ‘single quotes’.
Buncey will be happy.
Here's a cute little asterism for Buncey: ⁂
There is a set of code charts, including one for General Punctuation (PDF). Take the hexadecimal number under the character you would like and insert it between &#x (the `#' (hash or `pound sign') denotes a numerical rather than a worded escape code, and the `x' denotes hexadecimal as opposed to decimal notaion) and ;.
For example, &#x2020 gives the exotic † (dagger). However, † also produces a †.

I advised Buncey to use ` (backquote) and ' (single quote) for opening and closing quotes, respectively. This annoyed Buncey as the ` (backquote) is an opening quote, yet the ' (single quote) is not a closing quote - simply a single quote. I found the solution - so he'll be happy. I believe the complain originated with his dislike of Microsoft Word's problematic `smart-quotes'.

For those who aren't sure what Microsoft's smart quotes are:
For some unknown reason (well, one can presume it was part of its Embrace and extend strategy), Microsoft decided to use its own set of opening and closing quotes (i.e. real quotes as opposed to ` (backquote) and ' (single quote)). The problem was that there were already quote symbols in Unicode, which is a character set. As a result most browsers and operating systems, other than Microsoft's, display Microsoft's smart quotes very poorly (see example from PHP Princess - see related links).

Related Links:


This is probably a crappy article as I moved all over the place while writing. And now that I discover why I should use deciamal notation for Unicode (see Curling Quotes in Related Links) after I've gone on to explain how to do it in hexadecimal. Bah! I'm not editing this anymore as I just want to write down the usage of the quotes and the dashes before I go to bed. Web standards and related issues is a very interesting field. But doing big edits to already written blog posts isn't my thing.

I'll just mention:
“ doubles ” (“ and &8221;)
‘ singles ’ (‘ and &8217;)

0 Comments:

Post a Comment

<< Home