I searched a lot about the difference of unichar and char but did't get any clear concept.
also tell me difference about char[] and unichar[].
when use char and unichar ??
I searched a lot about the difference of unichar and char but did't get any clear concept.
also tell me difference about char[] and unichar[].
when use char and unichar ??
char is 8 bits and represents either an arbitrary 8-bit number, or a UTF-8 code unit, or a code unit in some other character encoding.
unichar is 16 bits and represents a UTF-16 code unit.
unichar is twice the size of char.
unichar often used in other language codes:
difference for example:
char a = 'y'; (correct)
char a = '字'; (wrong)
unichar a = '字'; (correct)
char a[2] : 8bit * 2
unichar a[2] : 16bit *2
hope it helps.