Results 1 to 7 of 7
Thread: convert to decimal
- 06-21-2011, 11:55 AM #1
convert to decimal
Hi friends,
i have a set of ascii data's i.e.,(cp437) format.. i want to convert these ascii values to decimal..
is this possible to convert.
String asciicp437 = "ÑΩ∞ód~" // (cp437 or IBM437)
am tried the normal concept but i didn't work..
here is my code
String asciicp437 = "ÑΩ∞ód~╣µÜ<";
for(..........)
{
char ch = asciicp437.charAt(i);
int a = (int)(ch);
String hex = Integer.toHexString(a);
system.out.println(hex);
}
any one can solve this
thanks and regards
jagan R
- 06-21-2011, 11:58 AM #2
When you put your code in [code][/code] tags it's easier to read.
Also, use a Short, Self Contained, Correct Example so we can see what's actually going on with your code.- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
- 06-21-2011, 12:11 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
- 06-21-2011, 12:15 PM #4
that's not a problem.. dec == hex == ascii == binary all are have the equvalant value.. i need any one of the conversion..
do u have the solution for this.. ??
- 06-21-2011, 12:19 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
- 06-21-2011, 12:23 PM #6
my code working finely.. but it converts the ascii value (cp437) to dec it shows the decimal value from cp1252 format (windows format)
i have the codepage437 ascii value.. to convert decimal
- 06-21-2011, 01:34 PM #7
Similar Threads
-
Convert Decimal To Binary
By aspire007 in forum New To JavaReplies: 8Last Post: 08-06-2010, 07:32 AM -
how to convert decimal value into 8-bit binary value
By tOpach in forum New To JavaReplies: 4Last Post: 10-26-2009, 10:17 PM -
Convert binary into decimal
By WarmRegards in forum New To JavaReplies: 8Last Post: 10-18-2009, 02:32 PM -
Convert decimal to binary..pls help..newbie here
By mephisto772 in forum New To JavaReplies: 5Last Post: 02-12-2009, 08:17 AM -
How do I convert a decimal value to hexadecimal with double precision (64 bit)
By SKaur in forum New To JavaReplies: 7Last Post: 01-12-2008, 09:02 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks