<commit_before>/*
 * Java core library component.
 *
 * Copyright (c) 1997, 1998
 *      Transvirtual Technologies, Inc.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file.
 */

package kaffe.io;
import java.util.Hashtable;

/**
 * Some encodings can be accessed under different names.
 * This class allows us to find an alternate encoding which we support.
 *
 * @author <NAME> <<EMAIL>>
 */
public class ConverterAlias {
    private static final Hashtable alias = new Hashtable();

    // All aliases should be upper case
    static {
	alias.put("DEFAULT",		"Default");
	alias.put("ISO-8859-1", 	"8859_1");
	alias.put("ISO_8859_1",		"8859_1");
	alias.put("ISO 8859-1",		"8859_1");
	alias.put("ISO 8859_1",		"8859_1");
	alias.put("ISO8859_1",		"8859_1");
	alias.put("LATIN1",	 	"8859_1");
	alias.put("IBM819",	 	"8859_1");
	alias.put("CP819",	 	"8859_1");
	alias.put("ISO-8859-2",		"8859_2");
	alias.put("ISO-8859-3",		"8859_3");
	alias.put("ISO-8859-4",		"8859_4");
	alias.put("ISO-8859-5",		"8859_5");
	alias.put("ISO-8859-6",		"8859_6");
	alias.put("ISO-8859-7",		"8859_7");
	alias.put("ISO-8859-8",		"8859_8");
	alias.put("ISO-8859-9",		"8859_9");
	alias.put("ISO-2022-JP",	"EUC_JP");
	alias.put("EBCDIC",		"CP1046");
	alias.put("UTF-8",		"UTF8");
	alias.put("KOI8-R",		"KOI8_R");
	/* add more here */
    }

    /**
     * Try to look up an alternate encoding for a given encoding name.
     *
     * @param name of the encoding for which an alias is sought.
     * @return alias if found, name if not.
     */
    static String alias(String name) {
	String alternate = (String)alias.get(name.toUpperCase());<commit_msg>Add a few more 8859_1 aliases.<commit_after>/*
 * Java core library component.
 *
 * Copyright (c) 1997, 1998
 *      Transvirtual Technologies, Inc.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file.
 */

package kaffe.io;
import java.util.Hashtable;

/**
 * Some encodings can be accessed under different names.
 * This class allows us to find an alternate encoding which we support.
 *
 * @author <NAME> <<EMAIL>>
 */
public class ConverterAlias {
    private static final Hashtable alias = new Hashtable();

    // All aliases should be upper case
    static {
	alias.put("DEFAULT",		"Default");
	alias.put("ISO-8859-1", 	"8859_1");
	alias.put("ISO_8859_1",		"8859_1");
	alias.put("ISO 8859-1",		"8859_1");
	alias.put("ISO 8859_1",		"8859_1");
	alias.put("ISO_8859-1",		"8859_1");
	alias.put("ISO8859_1",		"8859_1");
	alias.put("ISO-IR-100",		"8859_1");
	alias.put("LATIN1",	 	"8859_1");
	alias.put("L1",			"8859_1");
	alias.put("IBM819",	 	"8859_1");
	alias.put("CP819",	 	"8859_1");
	alias.put("CSISOLATIN1",	"8859_1");
	alias.put("ISO-8859-2",		"8859_2");
	alias.put("ISO-8859-3",		"8859_3");
	alias.put("ISO-8859-4",		"8859_4");
	alias.put("ISO-8859-5",		"8859_5");
	alias.put("ISO-8859-6",		"8859_6");
	alias.put("ISO-8859-7",		"8859_7");
	alias.put("ISO-8859-8",		"8859_8");
	alias.put("ISO-8859-9",		"8859_9");
	alias.put("ISO-2022-JP",	"EUC_JP");
	alias.put("EBCDIC",		"CP1046");
	alias.put("UTF-8",		"UTF8");
	alias.put("KOI8-R",		"KOI8_R");
	/* add more here */
    }

    /**
     * Try to look up an alternate encoding for a given encoding name.
     *
     * @param name of the encoding for which an alias is sought.
     * @return alias if found, name if not.
     */
    static String alias(String name) {
	String alternate = (String)alias.get(name.toUpperCase());
{'fraction_non_alphanumeric': 0.18125352907961603, 'fraction_numerical': 0.1070016939582157, 'mean_word_length': 3.589378238341969, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3009402', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1376, 'n_words': 324}