Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

objective-c - difference between 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 ??

like image 885
Hitesh Agarwal Avatar asked Dec 15 '22 05:12

Hitesh Agarwal


1 Answers

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.

like image 138
rob mayoff Avatar answered Dec 27 '22 23:12

rob mayoff