From: Asmus Freytag (asmusf@ix.netcom.com)
Date: Sun Nov 28 2010 - 23:37:59 CST
On 11/28/2010 4:06 PM, "Martin v. Löwis" wrote:
>> Well, some may disagree with me, but my first advice would be
>> to avoid macros like that altogether. And second, to absolutely
>> avoid any use of wchar_t in the context of processing Unicode
>> characters and strings.
> So how do you denote string constants using that approach?
The answer is, you don't. At least not as compile time constants that
you can identify as string literals in the source code.
That may be a correct approach for some type(s) of program, but it
ignored the circumstances of the original question.
And quite a few of the answers that were so helpfully supplied appeared
to have been written by people who either did not read the question very
carefully, or didn't fully understand the circumstances involved.
The C/C++ committees were lobbied in 2003 to include a proposal that
would recognize u"xyx" as the string literal xyz encoded in UTF-16 and
U"xyz" as the same string literal encoded in UTF-32.
Searching the web, you can find that this request resulted in a
Technical Report, but as I wrote before, I don't know who implemented
these recommendations, and if so, where and when.
A./
This archive was generated by hypermail 2.1.5 : Sun Nov 28 2010 - 23:43:48 CST