hello all,
please i want to ask a question about a size of the charecters i read some where that 2 charecters is ‎32 bit strings‎!!!!
isn't 2 charecter is 16 bit?
so what is i have problem with?? and how it is computed truly?
thanks very much to any help
best regards

The size of a character depends on the encoding for your character set. Do some research on ASCII and Unicode for details.

@Narue what i understood from your statement is:
If i represent encoding scheme for my 1 character to be 2byte; then yes, 2 characters are equals to 32bits..?

>>1byte = 2^4bits= 16bits

So, mayb What "s.w.a" read somewhere char was encoded into 2byte!

@Narue what i understood from your statement is:
If i represent encoding scheme for my 1 character to be 2byte; then yes, 2 characters are equals to 32bits..?

>>1byte = 2^4bits= 16bits

So, mayb What "s.w.a" read somewhere char was encoded into 2byte!

The OP could have read anything, correct or incorrect. It really doesn't change the answer that storage for characters depends on the character set and encoding scheme, and that there are several different and commmonly used variations.

Consider...
http://en.wikipedia.org/wiki/Utf8

Each character may require from one to six bytes.

(Hey; most of my characters take only one byte. I'm really efficient! ;-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.