Package org.w3c.tidy

# Class EncodingNameMapper

java.lang.Object
org.w3c.tidy.EncodingNameMapper

public abstract class EncodingNameMapper extends Object
Maps between Java and IANA character encoding names. Also handles encoding alias used in tidy c.

Version:
  $Revision: 804 $ ($Author: fgiust $)
Author:
  Fabrizio Giustina

## Constructor Summary

Constructors
Constructor
Description
`EncodingNameMapper()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`toIana(String encoding)`
Convert a Java character encoding name to its IANA equivalent.
`static String`
`toJava(String encoding)`
Converts an encoding name to the standard java name.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EncodingNameMapper

public EncodingNameMapper()

## Method Details

### toIana

public static String toIana(String encoding)
Convert a Java character encoding name to its IANA equivalent.

Parameters:
  `encoding` - java encoding name or alias
Returns:
  iana equivalent or null if no match is found.

### toJava

public static String toJava(String encoding)
Converts an encoding name to the standard java name. Handles IANA names, legacy names used in tidy and different java encoding alias. See http://www.iana.org/assignments/character-sets.

Parameters:
  `encoding` - IANA encoding name or alias
Returns:
  java equivalent or null if no match is found.