views:

761

answers:

2

Hello, can any body tell me, what is actually the difference between UCHAR and WCHAR. I am using VC++ 6.0.

Thanks in Advance

+2  A: 

A UCHAR is simply an unsigned char (8 bit)

A WCHAR is a unicode character (16 bit)

see here for more info

rein
+1  A: 

UCHAR as rein stated.

WCHAR is NOT a unicode character. This is a common misunderstanding. It's a 16 bit unsigned character, period. However, it might be interpreted as a unicode character and it might not be. UTF16 is a multi byte encoding just like UTF8, and might require representation by several WCHAR characters.

Magnus Skog