Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
I am starting to think about multinational character sets ....
I'm starting to think about multinational character sets, and I'm worried about the implications of making sizeof(char) be 2 so that 16-bit character sets can be represented.
✍: Guest
If type char were made 16 bits, sizeof(char) would still be 1, and CHAR_BIT in <limits.h> would be 16, and it would simply be impossible to declare (or allocate with malloc) a single 8-bit object.
Traditionally, a byte is not necessarily 8 bits, but merely a smallish region of memory, usually suitable for storing one character. The C Standard follows this usage, so the bytes used by malloc and sizeof can be more than 8 bits. (The Standard does not allow them to be less.)
To allow manipulation of multinational character sets without requiring an expansion of type char, ANSI/ISO C defines the ``wide'' character type wchar_t, and corresponding wide string literals, and functions for manipulating and converting strings of wide characters.
2016-03-02, 1235👍, 0💬
Popular Posts:
How To Create Nested Tables? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells You can cr...
What is COCOMO I, COCOMOII and COCOMOIII? In CD we have a complete free PDF tutorial of how to prepa...
How can you enable automatic paging in DataGrid ? Following are the points to be done in order to en...
What Tools to Use to View HTML Documents? The basic tool you need to view HTML documents is any Web ...
What are some advantages and disadvantages of Java Sockets? Advantages of Java Sockets: Sockets are ...