diff options
author | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
commit | 84adefa331c4159d432d22840663c38f155cd4c1 (patch) | |
tree | bff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/docbuilder/src/docb_html_util_iso.erl | |
download | otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2 otp-84adefa331c4159d432d22840663c38f155cd4c1.zip |
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/docbuilder/src/docb_html_util_iso.erl')
-rw-r--r-- | lib/docbuilder/src/docb_html_util_iso.erl | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/lib/docbuilder/src/docb_html_util_iso.erl b/lib/docbuilder/src/docb_html_util_iso.erl new file mode 100644 index 0000000000..c836805cd2 --- /dev/null +++ b/lib/docbuilder/src/docb_html_util_iso.erl @@ -0,0 +1,204 @@ +%% ``The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved via the world wide web at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. +%% Portions created by Ericsson are Copyright 1999-2000, Ericsson +%% Utvecklings AB. All Rights Reserved.'' +%% +%% $Id$ +%% +-module(docb_html_util_iso). +-export([entity_to_html/1]). + +%% Encodes ISOtech, ISOnum and ISOgrk3. +%% +%% All entities are of the form "[abcdef]". +%% +entity_to_html(Entity) when is_list(Entity), hd(Entity) =/= $[ -> + Entity; +entity_to_html(Entity) -> + case (catch enc(Entity)) of + {'EXIT', _} -> + Entity; + Enc -> + "<font face=symbol>" ++ Enc ++ "</font>" + end. + +enc("[Delta ]") -> "D"; +%% enc("[Dot ]") -> "�"; +%% enc("[DotDot]") -> "�"; +enc("[Gamma ]") -> "G"; +enc("[Lambda]") -> "L"; +enc("[Omega ]") -> "W"; +enc("[Phi ]") -> "F"; +enc("[Pi ]") -> "P"; +enc("[Prime ]") -> "²"; +enc("[Psi ]") -> "Y"; +enc("[Sigma ]") -> "S"; +enc("[Theta ]") -> "Q"; +enc("[Upsi ]") -> "¡"; +%% enc("[Verbar]") -> "�"; +enc("[Xi ]") -> "X"; + +enc("[aleph ]") -> "À"; +enc("[alpha ]") -> "a"; +enc("[amp ]") -> "&"; +enc("[and ]") -> "Ù"; +enc("[ang ]") -> "Ð"; +%% enc("[ang90 ]") -> "�"; +%% enc("[angsph]") -> "�"; +%% enc("[angst ]") -> "�"; +enc("[ap ]") -> "»"; + +%% enc("[becaus]") -> "�"; +%% enc("[bernou]") -> "�"; +enc("[bepsi ]") -> "'"; +enc("[beta ]") -> "b"; +enc("[bottom]") -> "^"; +enc("[bull ]") -> "·"; + +enc("[cap ]") -> "Ç"; +enc("[chi ]") -> "c"; +enc("[clubs ]") -> "§"; +%% enc("[compfn]") -> "�"; +enc("[cong ]") -> "@"; +enc("[copy ]") -> "Ó"; +%% enc("[conint]") -> "�"; +enc("[cup ]") -> "È"; + +enc("[dArr ]") -> "ß"; +enc("[darr ]") -> "¯"; +enc("[deg ]") -> "°"; +enc("[delta ]") -> "d"; +enc("[diam ]") -> "à"; +enc("[diams ]") -> "¨"; +enc("[divide]") -> "¸"; + +enc("[empty ]") -> "Æ"; +%% enc("[epsi ]") -> "�"; +%% enc("[epsis ]") -> "�"; +enc("[epsiv ]") -> "e"; +enc("[equiv ]") -> "º"; +enc("[eta ]") -> "h"; +enc("[exist ]") -> "$"; + +enc("[fnof ]") -> "¦"; +enc("[forall]") -> """; + +enc("[gamma ]") -> "g"; +%% enc("[gammad]") -> "�"; +enc("[ge ]") -> "³"; +enc("[gt ]") -> ">"; + +%% enc("[hamilt]") -> "�"; +enc("[hArr ]") -> "Û"; +enc("[harr ]") -> "«"; +enc("[hearts]") -> "©"; +enc("[horbar]") -> "¾"; + +enc("[iff ]") -> "Û"; +enc("[image ]") -> "Á"; +enc("[infin ]") -> "¥"; +enc("[int ]") -> "ò"; +enc("[iota ]") -> "i"; +enc("[isin ]") -> "Î"; + +enc("[kappa ]") -> "k"; +%%enc("[kappav]") -> "�"; + +enc("[lArr ]") -> "Ü"; +%% enc("[lagran]") -> "�"; +enc("[lambda]") -> "l"; +enc("[lang ]") -> "á"; +enc("[larr ]") -> "¬"; +enc("[le ]") -> "£"; +%% enc("[lowast]") -> "�"; +enc("[lowbar]") -> "_"; +enc("[lt ]") -> "<"; + +enc("[middot]") -> "×"; +enc("[minus ]") -> "-"; +%% enc("[mnplus]") -> "�"; +enc("[mu ]") -> "m"; + +enc("[nabla ]") -> "Ñ"; +enc("[ne ]") -> "¹"; +enc("[ni ]") -> "'"; +enc("[nsub ]") -> "Ë"; +enc("[not ]") -> "Ø"; +enc("[notin ]") -> "Ï"; +enc("[nu ]") -> "n"; + +enc("[omega ]") -> "w"; +enc("[or ]") -> "Ú"; +%% enc("[order ]") -> "�"; +enc("[oplus ]") -> "Å"; +enc("[otimes]") -> "Ä"; + +%% enc("[par ]") -> "�"; +enc("[part ]") -> "¶"; +%% enc("[permil]") -> "�"; +enc("[perp ]") -> "^"; % bottom +enc("[phis ]") -> "f"; +enc("[phiv ]") -> "j"; +%% enc("[phmmat]") -> "�"; +enc("[pi ]") -> "p"; +enc("[piv ]") -> "v"; +enc("[plus ]") -> "+"; +enc("[plusmn]") -> "±"; +enc("[prime ]") -> "¢"; +enc("[prod ]") -> "Õ"; +enc("[prop ]") -> "µ"; +enc("[psi ]") -> "y"; + +enc("[radic ]") -> "Ö"; +enc("[rang ]") -> "ñ"; +enc("[rArr ]") -> "Þ"; +enc("[rarr ]") -> "®"; +enc("[real ]") -> "Â"; +enc("[reg ]") -> "Ò"; +enc("[rho ]") -> "r"; +%% enc("[rhov ]") -> "�"; + +enc("[sigma ]") -> "s"; +enc("[sigmav]") -> "V"; +enc("[sim ]") -> "~"; +%% enc("[sime ]") -> "�"; +%% enc("[square]") -> "�"; +enc("[sol ]") -> "¤"; +enc("[spades]") -> "ª"; +enc("[sub ]") -> "Ì"; +enc("[sube ]") -> "Í"; +enc("[sup ]") -> "É"; +enc("[supe ]") -> "Ê"; +enc("[sum ]") -> "å"; + +enc("[tau ]") -> "t"; +enc("[tdot ]") -> "¼"; +enc("[there4]") -> "\"; +enc("[thetas]") -> "q"; +enc("[thetav]") -> "J"; +enc("[times ]") -> "´"; +%% enc("[tprime]") -> "�"; +enc("[trade ]") -> "Ô"; + +enc("[uArr ]") -> "Ý"; +enc("[uarr ]") -> "­"; +enc("[upsi ]") -> "u"; + +enc("[verbar]") -> "½"; + +%% enc("[wedgeq]") -> "�"; +enc("[weierp]") -> "Ã"; + +enc("[xi ]") -> "x"; + +enc("[zeta ]") -> "z". |