0

What I'm trying to accomplish is converting a character such as ☺ to an IBM437 character code. That is, ☺, would turn into a one, ☻ would turn into a two and so fourth (all according to the location of the specified character in the font: image from wikipedia.)

I've tried several different methods and done some heavy researching on the internet. After all, as pretty usual, it ends in asking a question on good old stackoverflow.

Thanks y'all,
Foru

  • possible duplicate of [Encoding conversion in java](http://stackoverflow.com/questions/229015/encoding-conversion-in-java) – Andy Turner Feb 17 '15 at 22:48
  • It's fairly possible. I, however, can't seem to figure out how to use it properly. :-( – Lucipher Mogan Feb 17 '15 at 23:12
  • `"☺".getBytes(java.nio.charset.Charset.forName("IBM-437"))` – Andy Turner Feb 17 '15 at 23:36
  • That for me returns the number 64 once having converted the byte to an integer. That is, simply casting it. That is the same with attempting to convert ☻ to IBM437. That also, as a matter of fact, converts to the number 63. – Lucipher Mogan Feb 18 '15 at 07:34

1 Answers1

0

Arent you just able to use, Charset To convert the encoding, if that is the question your answering, and Im sure their are some library's you can use.

the133448
  • 75
  • 7