Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-10-23 18:58:02


"Beman Dawes" <bdawes_at_[hidden]> wrote in message
news:6.0.3.0.2.20041023085844.028a7018_at_mailhost.esva.net...
> At 07:08 AM 10/23/2004, Andy Little wrote:
> >
> >The other problem that immediately springs to my mind is , how do I
> compose
> >a unicode string in my C++ source code. I really dont want to be dealing
> >with some unicode_character<TheEncode>(0x78,99,'c',-1) ; style.
>
> The C TR provides additional string literals and character constants. See
> below.
>
> --Beman
>
>
> 5.1 String literals and character constants notations

[snip detail]

Ok I understand that long term the C/C++ language should support Unicode
and I am all in favour.

The other question is whether there is a need for a C++ library which
provides definitive encodings ( Not restricted to Unicode) that can be
implemented in the Current C++ language. I could certainly make use of it
today. I would assume that such a library would be extremely useful in
deciding how to implement language support in C++. I would guess that to be
generic the characters could use named indirection in some cases, similar to
the html scheme...

typedef typename default_charset<GUI>:: type charset_type;

encoded_string<charset_type> str = "length " ;
str += charset_type::micro ; // much nicer ...
str += "m";
etc

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk