Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-11-14 17:14:16


From: <Msk_at_[hidden]>
> --- In boost_at_y..., "Hendrik Schober" <boost_at_H...> wrote:
> > Once the "formatting a string"-problem is attacked,
> > I'd rather have it solving the "do the same with
> > respect to i18", in order to make it more usefull
> > in general. The problem with other languages is
> > that it might change word and argument orderings.
> > With the above that's hard to do.
> > We use a scheme which allows to do this:
> > "A message with @(arg #1) and @(another arg)."
> > You pass two arguments, one is named "arg #1", the
> > other "another arg". We use this for exceptions
> > file://NotFound: "@(type) @(key) was not found"
> > throw XFileSpecError( ORIGIN_HERE, CMessage(NotFound)
> > + buildNamedParameter("type","folder")
> > + buildNamedParameter("key",filespec) );
> > as well as for logging:
> > LogMsg( ORIGIN_HERE,
> > "Object allocated @@@(this), about to call @(foo())...",
> > ERROR_PAR(this)+ERROR_PAR(foo()) );
>
> I hadn't even thought about internationalization.
> For strings that are intended for asserts or exceptions,
> that would seem to be overkill. These strings are
> like comments, in the sense that they are only intended
> to be seen by the programmer - and we normally include
> comments in only a single language. Also, I don't
> believe that std::exception::what() will handle 21-bit
> unicode.

It handles multi-byte encoded character strings, but whether
those support some verson of Unicode is implementation-
defined.


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