import java.io.UnsupportedEncodingException;

public class JI9052302 {
	public static void main(String[] args) throws UnsupportedEncodingException { 
		String expected = new String( 
				"\u0041" + "\u0062" + "\u0063" + 
						"\u0020" + 
						"\u05de" + "\u05e9" + "\u05ea" + "\u05de" + "\u05e9" + "\u05d9" + "\u05dd" + 
						"\u0020" + 
						"\u05e8" + "\u05e9" + "\u05d5" + "\u05de" + "\u05d9" + "\u05dd" + 
						"\u0020" + 
						"\u0064" + "\u0065" + "\u0066"); 

		// note that the hebrew word will be printed right-to-left in a modern terminal. 
		System.out.println(expected); 

		byte[] iso88598iBytesInLogicalOrder = new byte[]{ 
				(byte) 0x41, (byte) 0x62, (byte) 0x63, 
				(byte) 0x20, 
				(byte) 0xee, (byte) 0xf9, (byte) 0xfa, (byte) 0xee, (byte) 0xf9, (byte) 0xe9, (byte) 0xed, 
				(byte) 0x20, 
				(byte) 0xf8, (byte) 0xf9, (byte) 0xe5, (byte) 0xee, (byte) 0xe9, (byte) 0xed, 
				(byte) 0x20, 
				(byte) 0x64, (byte) 0x65, (byte) 0x66}; 

		String iso88598Decoded = new String(iso88598iBytesInLogicalOrder, "ISO-8859-8"); 
		if (iso88598Decoded.equals(expected)) { 
			System.out.println("OK 1"); 
		} 
		// UnsupportedEncodingException 
		String iso88598iDecoded = new String(iso88598iBytesInLogicalOrder, "ISO-8859-8-i"); 
		if (iso88598Decoded.equals(expected)) { 
			System.out.println("OK 2"); 
		} 
	} 
}
