javscipt: hex to string conversion problem:
-
hello, I am trying to develop a project using smart card. I am using SCardX_easy activex control in my webpage to extract info from my smart card. what i recieve in DataBuffer is a string of hex values separated by a white space and without a leading zero. for example ReceivedDataBuffer = "5B 50 0A 3E 5C 77 D8" and so on. now i need to convert this to a meaningful string say "test" how do i do that. this is what i am currently doing: ------------------------------------------ var data = new Array(); data = ReceivedDataBuffer.split("0A"); for (i=0; i<data.length;> { AddSubLine(data[i]); } -------------------------------------------- but instead of the data[i] containing hex i need string. "0A" is the newline character in hex i intend to separate data using newline as data length is variable in nature which is being stored in the card. thanks also any suggestions regarding my approach would be appreciated as i am basically a c programmer and have been taked javascript. i have gone through the basics but am stuck