Unicode strings: Difference between revisions

no edit summary
m (→‎{{header|Tcl}}: More notes)
No edit summary
Line 1:
{{draft task}}
Demonstrate how one is expected to handle Unicode strings. Some example considerations: can a Unicode string be directly written in the source code? How does one do IO with unicode strings? Can these strings be manipulated easily? Can non-ASCII characters be used for keywords/identifiers/etc (see [[Unicode variable names]])? What encodings (UTF-8, UTF-16, etc) can your language accept without much trouble?
=={{header|C}}==
C is not the most unicode friendly language, to put it mildly. Generally using unicode in C requires dealing with locales, manage data types carefully, and checking various aspects of your compiler. Directly embedding unicode strings in your C source might be a bad idea, too; it's safer to use their hex values. Here's a short example of doing the simplest string handling: print it.<lang C>#include <stdio.h>
Anonymous user