{"id":299,"date":"1997-09-09T01:36:29","date_gmt":"1997-09-09T09:36:29","guid":{"rendered":"http:\/\/www.birdhouse.org\/betips\/?p=299"},"modified":"1997-09-09T01:36:29","modified_gmt":"1997-09-09T09:36:29","slug":"convert-european-characters-to-html","status":"publish","type":"post","link":"https:\/\/www.betips.net\/?p=299","title":{"rendered":"Convert European characters to HTML"},"content":{"rendered":"<p>To get extended European characters such as &amp;eacute; &amp;egrave; &amp;ugrave; &amp;szlig; and &amp;Aring; to render properly in HTML, you need to represent them with extended HTML codes. Rather than relying on clunky look-up charts, create a simple sed script to do the hard work for you.<br \/>\nSave the two files below to <code>\/boot\/home\/config\/bin<\/code>. To use the system, assume you have a text document called MyFile. Open a Terminal window in that file&#8217;s directory and type:<\/p>\n<pre>convert MyFile<\/pre>\n<p>A second file will appear in the same directory, called MyFile.new. This second file will have all European extended characters replaced with their HTML equivalents. Now you can write J.L Gass&amp;eacute;e in an HTML page without mispelling. \ud83d\ude42<br \/>\nHere are the two files you need to create:<br \/>\nSave this first one as <code>\/boot\/home\/config\/bin\/convert<\/code>:<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<pre>file=\"$*\"\nsed -f \"\/boot\/home\/config\/bin\/convhtml.sed\" $file &gt; $file.new<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nSave this second one as <code>\/boot\/home\/config\/bin\/convhtml.sed<\/code> (note that<br \/>\nyou must be using a font capable of handling all extended characters in order<br \/>\nfor this to be displayed properly).<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<pre>s\/\u00a1\/\\&amp;iexcl;\/g\ns\/\u00a2\/\\&amp;cent;\/g\ns\/\u00a3\/\\&amp;pound;\/g\ns\/\u00a4\/\\&amp;curren;\/g\ns\/\u00a5\/\\&amp;yen;\/g\ns\/\u00a6\/\\&amp;brvbar;\/g\ns\/\u00a7\/\\&amp;sect;\/g\ns\/\u00a8\/\\&amp;uml;\/g\ns\/\u00a9\/\\&amp;copy;\/g\ns\/\u00aa\/\\&amp;ordf;\/g\ns\/\u00ab\/\\&amp;laquo;\/g\ns\/\u00ac\/\\&amp;not;\/g\ns\/\u00ae\/\\&amp;reg;\/g\ns\/\u00af\/\\&amp;macr;\/g\ns\/\u00b0\/\\&amp;deg;\/g\ns\/\u00b1\/\\&amp;plusmn;\/g\ns\/\u00b2\/\\&amp;sup2;\/g\ns\/\u00b3\/\\&amp;sup3;\/g\ns\/\u00b4\/\\&amp;acute;\/g\ns\/\u00b5\/\\&amp;micro;\/g\ns\/\u00b6\/\\&amp;para;\/g\ns\/\u00b7\/\\&amp;middot;\/g\ns\/\u00b8\/\\&amp;cedil;\/g\ns\/\u00b9\/\\&amp;sup1;\/g\ns\/\u00ba\/\\&amp;ordm;\/g\ns\/\u00bb\/\\&amp;raquo;\/g\ns\/\u00bc\/\\&amp;frac14;\/g\ns\/\u00bd\/\\&amp;frac12;\/g\ns\/\u00be\/\\&amp;frac34;\/g\ns\/\u00bf\/\\&amp;iquest;\/g\ns\/\u00c0\/\\&amp;Agrave;\/g\ns\/\u00c1\/\\&amp;Aacute;\/g\ns\/\u00c2\/\\&amp;Acirc;\/g\ns\/\u00c3\/\\&amp;Atilde;\/g\ns\/\u00c4\/\\&amp;Auml;\/g\ns\/\u00c5\/\\&amp;Aring;\/g\ns\/\u00c6\/\\&amp;AElig;\/g\ns\/\u00c7\/\\&amp;Ccedil;\/g\ns\/\u00c8\/\\&amp;Egrave;\/g\ns\/\u00c9\/\\&amp;Eacute;\/g\ns\/\u00ca\/\\&amp;Ecirc;\/g\ns\/\u00cb\/\\&amp;Euml;\/g\ns\/\u00cc\/\\&amp;Igrave;\/g\ns\/\u00cd\/\\&amp;Iacute;\/g\ns\/\u00ce\/\\&amp;Icirc;\/g\ns\/\u00cf\/\\&amp;Iuml;\/g\ns\/\u00d0\/\\&amp;ETH;\/g\ns\/\u00d1\/\\&amp;Ntilde;\/g\ns\/\u00d2\/\\&amp;Ograve;\/g\ns\/\u00d3\/\\&amp;Oacute;\/g\ns\/\u00d4\/\\&amp;Ocirc;\/g\ns\/\u00d5\/\\&amp;Otilde;\/g\ns\/\u00d6\/\\&amp;Ouml;\/g\ns\/\u00d7\/\\&amp;times;\/g\ns\/\u00d8\/\\&amp;Oslash;\/g\ns\/\u00d9\/\\&amp;Ugrave;\/g\ns\/\u00da\/\\&amp;Uacute;\/g\ns\/\u00db\/\\&amp;Ucirc;\/g\ns\/\u00dc\/\\&amp;Uuml;\/g\ns\/\u00dd\/\\&amp;Yacute;\/g\ns\/\u00de\/\\&amp;THORN;\/g\ns\/\u00df\/\\&amp;szlig;\/g\ns\/\u00e0\/\\&amp;agrave;\/g\ns\/\u00e1\/\\&amp;aacute;\/g\ns\/\u00e2\/\\&amp;acirc;\/g\ns\/\u00e3\/\\&amp;atilde;\/g\ns\/\u00e4\/\\&amp;auml;\/g\ns\/\u00e5\/\\&amp;aring;\/g\ns\/\u00e6\/\\&amp;aelig;\/g\ns\/\u00e7\/\\&amp;ccedil;\/g\ns\/\u00e8\/\\&amp;egrave;\/g\ns\/\u00e9\/\\&amp;eacute;\/g\ns\/\u00ea\/\\&amp;ecirc;\/g\ns\/\u00eb\/\\&amp;euml;\/g\ns\/\u00ec\/\\&amp;igrave;\/g\ns\/\u00ed\/\\&amp;iacute;\/g\ns\/\u00ee\/\\&amp;icirc;\/g\ns\/\u00ef\/\\&amp;iuml;\/g\ns\/\u00f0\/\\&amp;eth;\/g\ns\/\u00f1\/\\&amp;ntilde;\/g\ns\/\u00f2\/\\&amp;ograve;\/g\ns\/\u00f3\/\\&amp;oacute;\/g\ns\/\u00f4\/\\&amp;ocirc;\/g\ns\/\u00f5\/\\&amp;otilde;\/g\ns\/\u00f6\/\\&amp;ouml;\/g\ns\/\u00f7\/\\&amp;divide;\/g\ns\/\u00f8\/\\&amp;oslash;\/g\ns\/\u00f9\/\\&amp;ugrave;\/g\ns\/\u00fa\/\\&amp;uacute;\/g\ns\/\u00fb\/\\&amp;ucirc;\/g\ns\/\u00fc\/\\&amp;uuml;\/g\ns\/\u00fd\/\\&amp;yacute;\/g\ns\/\u00fe\/\\&amp;thorn;\/g\ns\/\u00ff\/\\&amp;yuml;\/g<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get extended European characters such as &amp;eacute; &amp;egrave; &amp;ugrave; &amp;szlig; and &amp;Aring; to render properly in HTML, you need to represent them with extended HTML codes. Rather than relying on clunky look-up charts, create a simple sed script to do the hard work for you. Save the two files below to \/boot\/home\/config\/bin. To use [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[10],"class_list":["post-299","post","type-post","status-publish","format-standard","hentry","tag-scripting"],"_links":{"self":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299"}],"version-history":[{"count":0,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/299\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}