how can i conver a String that contains OCTL character to ISO-8859-15, to make understable. I'm working with java. ty.
i'm trying to recuperate a value for a informix bbdd, an i put inside String, but when i show in view i saw Espa\321a---> and i wanna see ESPAÑA. I've looking for an saw that \321 is a OCTL is this possible ?
HTML OCTL HEX CMP CHR MEANING
Ñ | \321 | =D1 | N ~ | (Ñ) | Capital N, tilde
so OCTL = \321 = Ñ
I try this but don't work for me, i'm doing sth wrong.
Charset charset = Charset.forName("OCTL");
CharsetDecoder decoder = charset.newDecoder();
CharsetEncoder encoder = charset.newEncoder();
try {
ByteBuffer bbuf = encoder.encode(CharBuffer.wrap(rs.getString(Constants.DES_PAIS_COM)));
ByteBuffer and then to a string.
CharBuffer cbuf = decoder.decode(bbuf);
String s = cbuf.toString();
deuteDetall.setDesPaisCom(s);
} catch (CharacterCodingException e) {
}