Loading

Monday, August 16, 2010

Convert int to Extended ASCII

In my old exercise "ListView with more items on each entry, using SimpleAdapter", convertion of int to ASCII have been introduced:

//i is the int to be converted
byte[] data = {(byte) i};
CharSequence strSymbol = EncodingUtils.getAsciiString(data);



The follwing code show how to convert from int (0x80~0xFF) to extended ASCII of charset "windows-1252", using org.apache.http.util.EncodingUtils.

//i is the int to be converted
byte[] data = {(byte) i};
CharSequence strSymbol = EncodingUtils.getString(data, "windows-1252");





SHARE TWEET

Thank you for reading this article Convert int to Extended ASCII With URL https://x-tutorials.blogspot.com/2010/08/convert-int-to-extended-ascii.html. Also a time to read the other articles.

0 comments:

Write your comment for this article Convert int to Extended ASCII above!