From ae50bc562eab999b1917ebc9d9e052109bf9b64d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= <interface@p3k.org>
Date: Fri, 27 Mar 2020 21:13:11 +0100
Subject: [PATCH] del: obsolete entity table and test method

---
 src/main/java/helma/util/HtmlEncoder.java | 167 ----------------------
 1 file changed, 167 deletions(-)

diff --git a/src/main/java/helma/util/HtmlEncoder.java b/src/main/java/helma/util/HtmlEncoder.java
index 442b402e..d5d86c17 100644
--- a/src/main/java/helma/util/HtmlEncoder.java
+++ b/src/main/java/helma/util/HtmlEncoder.java
@@ -23,147 +23,6 @@ import java.util.*;
  * for HTML output.
  */
 public final class HtmlEncoder {
-
-    // transformation table for characters 128 to 255. These actually fall into two
-    // groups, put together for efficiency: "Windows" chacacters 128-159 such as
-    // "smart quotes", which are encoded to valid Unicode entities, and
-    // valid ISO-8859 caracters 160-255, which are encoded to the symbolic HTML
-    // entity. Everything >= 256 is encoded to a numeric entity.
-    //
-    // for mor on HTML entities see http://www.pemberley.com/janeinfo/latin1.html  and
-    // ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT
-    //
-    static final String[] transform =  {
-        "&euro;",   // 128
-        "",           // empty string means character is undefined in unicode
-        "&#8218;",
-        "&#402;",
-        "&#8222;",
-        "&#8230;",
-        "&#8224;",
-        "&#8225;",
-        "&#710;",
-        "&#8240;",
-        "&#352;",
-        "&#8249;",
-        "&#338;",
-        "",
-        "&#381;",
-        "",
-        "",
-        "&#8216;",
-        "&#8217;",
-        "&#8220;",
-        "&#8221;",
-        "&#8226;",
-        "&#8211;",
-        "&#8212;",
-        "&#732;",
-        "&#8482;",
-        "&#353;",
-        "&#8250;",
-        "&#339;",
-        "",
-        "&#382;",
-        "&#376;",  // 159
-        "&nbsp;",    // 160
-        "&iexcl;",
-        "&cent;",
-        "&pound;",
-        "&curren;",
-        "&yen;",
-        "&brvbar;",
-        "&sect;",
-        "&uml;",
-        "&copy;",
-        "&ordf;",
-        "&laquo;",
-        "&not;",
-        "&shy;",
-        "&reg;",
-        "&macr;",
-        "&deg;",
-        "&plusmn;",
-        "&sup2;",
-        "&sup3;",
-        "&acute;",
-        "&micro;",
-        "&para;",
-        "&middot;",
-        "&cedil;",
-        "&sup1;",
-        "&ordm;",
-        "&raquo;",
-        "&frac14;",
-        "&frac12;",
-        "&frac34;",
-        "&iquest;",
-        "&Agrave;",
-        "&Aacute;",
-        "&Acirc;",
-        "&Atilde;",
-        "&Auml;",
-        "&Aring;",
-        "&AElig;",
-        "&Ccedil;",
-        "&Egrave;",
-        "&Eacute;",
-        "&Ecirc;",
-        "&Euml;",
-        "&Igrave;",
-        "&Iacute;",
-        "&Icirc;",
-        "&Iuml;",
-        "&ETH;",
-        "&Ntilde;",
-        "&Ograve;",
-        "&Oacute;",
-        "&Ocirc;",
-        "&Otilde;",
-        "&Ouml;",
-        "&times;",
-        "&Oslash;",
-        "&Ugrave;",
-        "&Uacute;",
-        "&Ucirc;",
-        "&Uuml;",
-        "&Yacute;",
-        "&THORN;",
-        "&szlig;",
-        "&agrave;",
-        "&aacute;",
-        "&acirc;",
-        "&atilde;",
-        "&auml;",
-        "&aring;",
-        "&aelig;",
-        "&ccedil;",
-        "&egrave;",
-        "&eacute;",
-        "&ecirc;",
-        "&euml;",
-        "&igrave;",
-        "&iacute;",
-        "&icirc;",
-        "&iuml;",
-        "&eth;",
-        "&ntilde;",
-        "&ograve;",
-        "&oacute;",
-        "&ocirc;",
-        "&otilde;",
-        "&ouml;",
-        "&divide;",
-        "&oslash;",
-        "&ugrave;",
-        "&uacute;",
-        "&ucirc;",
-        "&uuml;",
-        "&yacute;",
-        "&thorn;",
-        "&yuml;"    // 255
-    };
-
     // HTML block tags need to suppress automatic newline to <br>
     // conversion around them to look good. However, they differ
     // in how many newlines around them should ignored. These sets
@@ -887,32 +746,6 @@ public final class HtmlEncoder {
         }
     }
 
-    // test method
-    public static String printCharRange(int from, int to) {
-        StringBuffer response = new StringBuffer();
-
-        for (int i = from; i < to; i++) {
-            response.append(i);
-            response.append("      ");
-            response.append((char) i);
-            response.append("      ");
-
-            if (i < 128) {
-                response.append((char) i);
-            } else if ((i >= 128) && (i < 256)) {
-                response.append(transform[i - 128]);
-            } else {
-                response.append("&#");
-                response.append(i);
-                response.append(";");
-            }
-
-            response.append("\r\n");
-        }
-
-        return response.toString();
-    }
-
     // for testing...
     public static void main(String[] args) {
         for (int i = 0; i < args.length; i++)