Monday, February 2, 2009

HTML Character Entities On Linux Or Unix - Follow Up

Hey there,

Today's post hearkens back to a post we ran back in December of 2007 regarding publishing Perl, shell and other code on Blogspot. The problem isn't really limited to blogspot.com, of course. Most sites that let you directly add content, and use a standard markup tagging system, have issues with many of the symbols found in Linux and Unix programming/shell code. I, personally, have gained a much deeper appreciation for bbcode, although it suffers from the same problems depending on what you want to "really" show on your page, just to a lesser degree.

The issue with publishing code in HTML (See, I'm going to stop kicking blogspot.com now ;) is that many of the symbols are the same as those used in the markup language itself. For instance, the < and > characters can't be written exactly as they appear when you're writing an HTML page to showcase your code, since all HTML tags (I believe ;) open with the < character and close with the > character. This can result in errors ranging from problems saving your posts to entire chunks of your code disappearing without any errors generated at all (the latter being the most disarming)

Obviously, I've been meaning to do this for a while (only 14 months from intent to action ;), but - for today - I've put together a list of common HTML character entities and how they should "really" be typed when you write your HTML. If I missed any, I'd love to hear from you, as I'd prefer for this to be a complete list, if that's at all possible :)

NOTE: Not all of these may display correctly in your web browser, since some may not be in your native character-set. Most of the fancy stuff (Greek, foreign characters, etc) was found on Elizabeth Castro's HTML XHTML Character Entity Page. Please visit that site to ensure that the information found here hasn't been expanded upon, and give her the credit she deserves for compiling so many more characters than I could ever imagine having to type :)

Enjoy, and welcome back to the work week (hopefully, you're on vacation :)

Cheers,

BASIC CHARACTERS (REGULAR):

& is actually typed as: &amp;
> is actually typed as: &gt;
< is actually typed as: &lt;
" is actually typed as: &quot;
´ is actually typed as: &acute;
¸ is actually typed as: &cedil;
ˆ is actually typed as: &circ;
¯ is actually typed as: &macr;
· is actually typed as: &middot;
˜ is actually typed as: &tilde;
¨ is actually typed as: &uml;
° is actually typed as: &deg;
÷ is actually typed as: &divide;
½ is actually typed as: &frac12;
¼ is actually typed as: &frac14;
¾ is actually typed as: &frac34;
≥ is actually typed as: &ge;
≤ is actually typed as: &le;
− is actually typed as: &minus;
² is actually typed as: &sup2;
³ is actually typed as: &sup3;
× is actually typed as: &times;
¢ is actually typed as: &cent;
¤ is actually typed as: &curren;
€ is actually typed as: &euro;
£ is actually typed as: &pound;
¥ is actually typed as: &yen;
¦ is actually typed as: &brvbar;
• is actually typed as: &bull;
© is actually typed as: &copy;
† is actually typed as: &dagger;
‡ is actually typed as: &Dagger;
⁄ is actually typed as: &frasl;
… is actually typed as: &hellip;
¡ is actually typed as: &iexcl;
ℑ is actually typed as: &image;
¿ is actually typed as: &iquest;
‎ is actually typed as: &lrm;
— is actually typed as: &mdash;
– is actually typed as: &ndash;
¬ is actually typed as: &not;
‾ is actually typed as: &oline;
ª is actually typed as: &ordf;
º is actually typed as: &ordm;
¶ is actually typed as: &para;
‰ is actually typed as: &permil;
′ is actually typed as: &prime;
″ is actually typed as: &Prime;
ℜ is actually typed as: &real;
® is actually typed as: &reg;
‏ is actually typed as: &rlm;
§ is actually typed as: &sect;
­ is actually typed as: &shy;
¹ is actually typed as: &sup1;
™ is actually typed as: &trade;
℘ is actually typed as: &weierp;
„ is actually typed as: &bdquo;
« is actually typed as: &laquo;
“ is actually typed as: &ldquo;
‹ is actually typed as: &lsaquo;
‘ is actually typed as: &lsquo;
» is actually typed as: &raquo;
” is actually typed as: &rdquo;
› is actually typed as: &rsaquo;
’ is actually typed as: &rsquo;
‚ is actually typed as: &sbquo;
  is actually typed as: &emsp;
  is actually typed as: &ensp;
  is actually typed as: &nbsp;
  is actually typed as: &thinsp;
‍ is actually typed as: &zwj;
‌ is actually typed as: &zwnj;

SOMEWHAT IRREGULAR CHARACTERS:

Á is actually typed as: &Aacute;
á is actually typed as: &aacute;
 is actually typed as: &Acirc;
â is actually typed as: &acirc;
Æ is actually typed as: &AElig;
æ is actually typed as: &aelig;
À is actually typed as: &Agrave;
à is actually typed as: &agrave;
Å is actually typed as: &Aring;
å is actually typed as: &aring;
à is actually typed as: &Atilde;
ã is actually typed as: &atilde;
Ä is actually typed as: &Auml;
ä is actually typed as: &auml;
Ç is actually typed as: &Ccedil;
ç is actually typed as: &ccedil;
É is actually typed as: &Eacute;
é is actually typed as: &eacute;
Ê is actually typed as: &Ecirc;
ê is actually typed as: &ecirc;
È is actually typed as: &Egrave;
è is actually typed as: &egrave;
Ð is actually typed as: &ETH;
ð is actually typed as: &eth;
Ë is actually typed as: &Euml;
ë is actually typed as: &euml;
Í is actually typed as: &Iacute;
í is actually typed as: &iacute;
Î is actually typed as: &Icirc;
î is actually typed as: &icirc;
Ì is actually typed as: &Igrave;
ì is actually typed as: &igrave;
Ï is actually typed as: &Iuml;
ï is actually typed as: &iuml;
Ñ is actually typed as: &Ntilde;
ñ is actually typed as: &ntilde;
Ó is actually typed as: &Oacute;
ó is actually typed as: &oacute;
Ô is actually typed as: &Ocirc;
ô is actually typed as: &ocirc;
Πis actually typed as: &OElig;
œ is actually typed as: &oelig;
Ò is actually typed as: &Ograve;
ò is actually typed as: &ograve;
Ø is actually typed as: &Oslash;
ø is actually typed as: &oslash;
Õ is actually typed as: &Otilde;
õ is actually typed as: &otilde;
Ö is actually typed as: &Ouml;
ö is actually typed as: &ouml;
Š is actually typed as: &Scaron;
š is actually typed as: &scaron;
ß is actually typed as: &szlig;
Þ is actually typed as: &THORN;
þ is actually typed as: &thorn;
Ú is actually typed as: &Uacute;
ú is actually typed as: &uacute;
Û is actually typed as: &Ucirc;
û is actually typed as: &ucirc;
Ù is actually typed as: &Ugrave;
ù is actually typed as: &ugrave;
Ü is actually typed as: &Uuml;
ü is actually typed as: &uuml;
Ý is actually typed as: &Yacute;
ý is actually typed as: &yacute;
ÿ is actually typed as: &yuml;
Ÿ is actually typed as: &Yuml;
ℵ is actually typed as: &alefsym;
∧ is actually typed as: &and;
∠ is actually typed as: &ang;
≈ is actually typed as: &asymp;
∩ is actually typed as: &cap;
≅ is actually typed as: &cong;
∪ is actually typed as: &cup;
∅ is actually typed as: &empty;
≡ is actually typed as: &equiv;
∃ is actually typed as: &exist;
ƒ is actually typed as: &fnof;
∀ is actually typed as: &forall;
∞ is actually typed as: &infin;
∫ is actually typed as: &int;
∈ is actually typed as: &isin;
⟨ is actually typed as: &lang;
⌈ is actually typed as: &lceil;
⌊ is actually typed as: &lfloor;
∗ is actually typed as: &lowast;
µ is actually typed as: &micro;
∇ is actually typed as: &nabla;
≠ is actually typed as: &ne;
∋ is actually typed as: &ni;
∉ is actually typed as: &notin;
⊄ is actually typed as: &nsub;
⊕ is actually typed as: &oplus;
∨ is actually typed as: &or;
⊗ is actually typed as: &otimes;
∂ is actually typed as: &part;
⊥ is actually typed as: &perp;
± is actually typed as: &plusmn;
∏ is actually typed as: &prod;
∝ is actually typed as: &prop;
√ is actually typed as: &radic;
⟩ is actually typed as: &rang;
⌉ is actually typed as: &rceil;
⌋ is actually typed as: &rfloor;
⋅ is actually typed as: &sdot;
∼ is actually typed as: &sim;
⊂ is actually typed as: &sub;
⊆ is actually typed as: &sube;
∑ is actually typed as: &sum;
⊃ is actually typed as: &sup;
⊇ is actually typed as: &supe;
∴ is actually typed as: &there4;
Α is actually typed as: &Alpha;
α is actually typed as: &alpha;
Β is actually typed as: &Beta;
β is actually typed as: &beta;
Χ is actually typed as: &Chi;
χ is actually typed as: &chi;
Δ is actually typed as: &Delta;
δ is actually typed as: &delta;
Ε is actually typed as: &Epsilon;
ε is actually typed as: &epsilon;
Η is actually typed as: &Eta;
η is actually typed as: &eta;
Γ is actually typed as: &Gamma;
γ is actually typed as: &gamma;
Ι is actually typed as: &Iota;
ι is actually typed as: &iota;
Κ is actually typed as: &Kappa;
κ is actually typed as: &kappa;
Λ is actually typed as: &Lambda;
λ is actually typed as: &lambda;
Μ is actually typed as: &Mu;
μ is actually typed as: &mu;
Ν is actually typed as: &Nu;
ν is actually typed as: &nu;
Ω is actually typed as: &Omega;
ω is actually typed as: &omega;
Ο is actually typed as: &Omicron;
ο is actually typed as: &omicron;
Φ is actually typed as: &Phi;
φ is actually typed as: &phi;
Π is actually typed as: &Pi;
π is actually typed as: &pi;
ϖ is actually typed as: &piv;
Ψ is actually typed as: &Psi;
ψ is actually typed as: &psi;
Ρ is actually typed as: &Rho;
ρ is actually typed as: &rho;
Σ is actually typed as: &Sigma;
σ is actually typed as: &sigma;
ς is actually typed as: &sigmaf;
Τ is actually typed as: &Tau;
τ is actually typed as: &tau;
Θ is actually typed as: &Theta;
θ is actually typed as: &theta;
ϑ is actually typed as: &thetasym;
ϒ is actually typed as: &upsih;
Υ is actually typed as: &Upsilon;
υ is actually typed as: &upsilon;
Ξ is actually typed as: &Xi;
ξ is actually typed as: &xi;
Ζ is actually typed as: &Zeta;
↵ is actually typed as: &crarr;
↓ is actually typed as: &darr;
⇓ is actually typed as: &dArr;
↔ is actually typed as: &harr;
⇔ is actually typed as: &hArr;
← is actually typed as: &larr;
⇐ is actually typed as: &lArr;
→ is actually typed as: &rarr;
⇒ is actually typed as: &rArr;
↑ is actually typed as: &uarr;
⇑ is actually typed as: &uArr;
♣ is actually typed as: &clubs;
♦ is actually typed as: &diams;
♥ is actually typed as: &hearts;
♠ is actually typed as: &spades;
◊ is actually typed as: &loz;


, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.