code: public static String adjustHtmlEncoding(String input, String encoding) {
  
          return encodeHtmlEntities(decodeHtmlEntities(input, encoding), encoding);
      }
docs: Adjusts the given String by making sure all characters that can be displayed
  in the given charset are contained as chars, whereas all other non-displayable
  characters are converted to HTML entities.<p>
  
  Just calls {@link #decodeHtmlEntities(String, String)} first and feeds the result
  to {@link #encodeHtmlEntities(String, String)}. <p>
  
  @param input the input to adjust the HTML encoding for
  @param encoding the charset to encode the result with\
  
  @return the input with the decoded/encoded HTML entities