From: Le Chaud Lapin on
{ The question concerns the two C++0x types char16_t and char32_t. -mod }

Hi All,

Any idea when these two types will be commonly supported across major
compilers?

2010? 2011? Later?

My primary development environment is VS2008 on Windows.

TIA,

-Le Chaud Lapin-

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Andrew on
On 5 Jan, 02:35, Le Chaud Lapin <jaibudu...(a)gmail.com> wrote:
> { The question concerns the two C++0x types char16_t and char32_t. -mod }
>
> Hi All,
>
> Any idea when these two types will be commonly supported across major
> compilers?
>
> 2010? 2011? Later?

No idea. I didn't even know this was being thought of. Having been in
Javaland recently I do miss unicode. IMO it is a bit of a hole in C++,
especially when it comes to handling XML. I reckon explicit unicode
support would be far more useful then char16_t and char32_t. I think
talking about char16t_t and char32_t is too low level and the higher
level concepts are more useful. I can't see it happening for C++
though.

>
> My primary development environment is VS2008 on Windows.

Mine is also VS at the moment. I am using the C++ version of Xerces
for XML work and it is a right pain to convert back and forth between
C-style const char* and XMLCh*, which is xerces way of doing unicode.
char16_t and/or char32_t would be no help there.

Regards,

Andrew Marlow

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Mathias Gaunard on
On Jan 5, 2:35 am, Le Chaud Lapin <jaibudu...(a)gmail.com> wrote:
> { The question concerns the two C++0x types char16_t and char32_t. -mod }
>
> Hi All,
>
> Any idea when these two types will be commonly supported across major
> compilers?

The types themselves are of little use.
What you want are Unicode character and string literals. I know GCC
supports them since version 4.5, no idea about MSVC.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Le Chaud Lapin on
On Jan 8, 12:48 am, Mathias Gaunard <loufo...(a)gmail.com> wrote:
> On Jan 5, 2:35 am, Le Chaud Lapin <jaibudu...(a)gmail.com> wrote:
>
> > { The question concerns the two C++0x types char16_t and char32_t. -mod }
>
> > Hi All,
>
> > Any idea when these two types will be commonly supported across major
> > compilers?
>
> The types themselves are of little use.
> What you want are Unicode character and string literals. I know GCC
> supports them since version 4.5, no idea about MSVC.

Then what are they for, and why have they been included in C++0x?

-Le Chaud Lapin-


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: James Kanze on
On Jan 8, 1:40 pm, Le Chaud Lapin <jaibudu...(a)gmail.com> wrote:
> On Jan 8, 12:48 am, Mathias Gaunard <loufo...(a)gmail.com> wrote:

> > On Jan 5, 2:35 am, Le Chaud Lapin <jaibudu...(a)gmail.com> wrote:

> > > Any idea when these two types will be commonly supported
> > > across major compilers?

> > The types themselves are of little use.
> > What you want are Unicode character and string literals. I know GCC
> > supports them since version 4.5, no idea about MSVC.

> Then what are they for, and why have they been included in C++0x?

Because you can't implement UTF-16 and UTF-32 character and
string literals without them. (Except that I disagree with
regards to their utility. I find it rather a step forward to
have a type which I know can hold a UTF-16 or a UTF-32 element.)

--
James Kanze

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]