Single byte Hex - URGENT

  • Thread starter Thread starter Seion
  • Start date Start date
S

Seion

Hi,

Any body can teach me how to convert double bytes HEX to single byte HEX?
I'm not too sure what does this mean. But, it is a requirement from a
server software that only allow single byte hex to be transfered to it.

Hope can get some help here.

Thanks first.

Seion
 
It's really difficult for me to tell what you're trying to do here. There's
not enough detail.

Typically when people are talking about double byte stuff they're talking
about Asian characters. If you're not dealing with those then you're
probably ok. You're post seems to indicate that the server cannot process
these characters. As far as i know you cannot pack two bytes worth of data
into one without some kind of compression therefore you can't transform
double byte hex into single byte hex.

If you're wondering what "HEX" is it is just a different way of representing
a number. For example
The number 60 =
3C in Hex
111100 in binary

All three of these are exactly the same thing.

Hope that helps,
Shawn
 
-----Original Message-----
Hi,

Any body can teach me how to convert double bytes HEX to single byte HEX?
I'm not too sure what does this mean. But, it is a requirement from a
server software that only allow single byte hex to be transfered to it.

Hope can get some help here.

Thanks first.

Seion
.
Well, assuming you're using VB.NET because I'm not sure
what language you're using, it should work as long as your
hex value is less than 255 (FF) the maximum capacity of
one byte is 2^8 (256) or 0-255.

If you have a hex value larger than FF it would require
two bytes. If you use vb to check the value, as long as
it is less than 255 it is one byte, and it should fit into
the byte data type.

I haven't actually done this, but seeing as how nobody
else replied and it said urgent maybe it will get you
going in the right direction.
 
Back
Top