Sun Studio 12: C++ User's Guide

Example

The following example shows a string literal in quotes that is prepended by U. It also shows a command line that specifies -xustr


example% cat file.cc
const unsigned short *foo = U"foo";
const unsigned short bar[] = U"bar";
const unsigned short *fun() {return U"fun"};
example% CC -xustr=ascii_utf16_ushort file.cc -c