Conversions

  • Thread starter Thread starter scorpion53061
  • Start date Start date
S

scorpion53061

Has anyone ever tried to write a routine that converts a hexadecimal string
you are reading to a character representation?
 
* "scorpion53061 said:
Has anyone ever tried to write a routine that converts a hexadecimal string
you are reading to a character representation?

Can you post a sample?
 
Sure sorry........

00000000 1b 67 0d .g.

00000000 1b 59 37 20 1b 34 40 1b 3e 42 1b 49 1b 59 37 6e .Y7 .4@. >B.I.Y7n

00000010 1b 59 37 20 53 45 4c 45 43 54 20 57 41 52 45 48 .Y7 SELE CT WAREH

00000020 4f 55 53 45 20 46 4f 52 20 49 4e 51 55 49 52 59 OUSE FOR INQUIRY

00000030 20 1b 34 28 61 5f 5f 1b 44 .4(a__. D
 
I know there is something in here that represents F7.
I am trying to figure out how and where the F7 was sent.

scorpion53061 said:
Sure sorry........

00000000 1b 67 0d .g.

00000000 1b 59 37 20 1b 34 40 1b 3e 42 1b 49 1b 59 37 6e .Y7 .4@.
B.I.Y7n

00000010 1b 59 37 20 53 45 4c 45 43 54 20 57 41 52 45 48 .Y7 SELE CT WAREH

00000020 4f 55 53 45 20 46 4f 52 20 49 4e 51 55 49 52 59 OUSE FOR INQUIRY

00000030 20 1b 34 28 61 5f 5f 1b 44 .4(a__. D
 
Scorpion,
Define "character" as in your other post you mention F7, do you mean
keyboard character F7 or the byte F7 as a ANSI or Unicode code point?


You can use System.Convert.ToByte, ToInt16, ToInt32, & ToInt64 to convert a
string into a Byte, Short, Integer, or Long. You may need a loop to convert
grouping of characters into individual Bytes, Shorts, Integers, and Longs...

Then using the System.Text.Encoding you can convert the above Byte (or array
of Bytes) into a string...

Hope this helps
Jay
 
Back
Top