Hi i'm coding a packet sniffer in C++. It's working now, but I'm receiving a char buffer and I want to show the packet data on the screen in a hex representation.
I've already researched of a char to hex conversion but I have a problem when the packet data has a char with an extended ascii code like a 'ê' character or another like this. When that occurs the 'ê' character is displayed as {0xA8, 0xBA} and sometimes like {0xBA} and not like the {0xC3, 0xAA} according to the the conversion in www.asciitohex.com.
int WINAPI send(SOCKET s, const char* buf, int len, int flags)
{
//do the conversion of socket data here
return pSend(s, buf, len, flags);
}