here's a emacs quiz for you advanced emacs users out there.
HTML version at
http://xahlee.blogspot.com/2011/09/emacs-quiz-replacing-html-entities-with.html
plain text version follows:
───────────────────────────────────────
I have a file with content like this:
…
<tr><td>pound</td><td>£</td><td>pound sign, U+00A3</td></tr>
<tr><td>curren</td><td>¤</td><td>currency sign, U+00A4</td></tr>
<tr><td>yen</td><td>¥</td><td>yen sign = yuan sign, U+00A5</td></
tr>
<tr><td>brvbar</td><td>¦</td><td>broken bar = broken vertical
bar, U+00A6</td></tr>
<tr><td>sect</td><td>§</td><td>section sign, U+00A7</td></tr>
<tr><td>uml</td><td>¨</td><td>diaeresis = spacing diaeresis, U
+00A8</td></tr>
<tr><td>copy</td><td>©</td><td>copyright sign, U+00A9</td></tr>
<tr><td>ordf</td><td>ª</td><td>feminine ordinal indicator, U
+00AA</td></tr>
<tr><td>laquo</td><td>«</td><td>left-pointing double angle
quotation mark = left pointing guillemet, U+00AB</td></tr>
…
I need it to be like this:
…
<tr><td>pound</td>£<td>pound sign, U+00A3</td></tr>
<tr><td>curren</td>¤<td>currency sign, U+00A4</td></tr>
<tr><td>yen</td>¥<td>yen sign = yuan sign, U+00A5</td></tr>
<tr><td>brvbar</td>¦<td>broken bar = broken vertical bar, U+00A6</td></
tr>
<tr><td>sect</td>§<td>section sign, U+00A7</td></tr>
<tr><td>uml</td>¨<td>diaeresis = spacing diaeresis, U+00A8</td></tr>
<tr><td>copy</td>©<td>copyright sign, U+00A9</td></tr>
<tr><td>ordf</td>ª<td>feminine ordinal indicator, U+00AA</td></tr>
<tr><td>laquo</td>«<td>left-pointing double angle quotation mark =
left pointing guillemet, U+00AB</td></tr>
…
How would you do it using emacs's power?
I'll post a solution in 2 days.
PS you can use emacs lisp too, whichever solution you find easier.
Xah