Mistři v programování na #hovnokod

Java #719

public static String normalizeEncoding(String encoding) {
    if (encoding == null) {
      encoding = "";
    }
    encoding = encoding.trim();
    encoding = encoding.replace("cp1251", "windows-1251");
    encoding = encoding.replace("cp1251", "windows-1251");
    encoding = encoding.replace("cp-1251", "windows-1251");
    encoding = encoding.replace("win-1251", "windows-1251");
    encoding = encoding.replace("utf8", "utf-8");
    return encoding;
  }

HovnoKod,