0

Can someone tell me how to display a corresponding unicode character for a given input hex value

For example, consider I have a buffer which contain data like this [00210028004d015500abffff....]. Now i need to take set of four bytes and then convert that to equivalent unicode character.

So the output of this buffer will be !(M... (Don't know what are the unicode equivalent of 0155,00ab,ffff)

I can use a code like this to print an ascii char

    int t=65;
    char asciiChar = static_cast<char>(t);
    printf("%s",asciiChar);

and the output will be 'A'

Similarly is there any method to get Unicode chars

Thanks

Vinod Paul
  • 359
  • 2
  • 14

2 Answers2

0

If you are using windows use the functions described here

Quonux
  • 2,975
  • 1
  • 24
  • 32
0

You can do this:

char myChar = '\u0028';
Joseph Pla
  • 1,600
  • 1
  • 10
  • 21