Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-11 20:08:48


"George M. Garner Jr." <gmgarner_at_[hidden]> wrote in message
news:ci05c3$4d3$1_at_sea.gmane.org...
> Johnathan,
>
> > The problem is really that I haven't finished writing the components that
> > make
> > this easy. For this, I apologize. (See User's Guide-->Code Conversion.)
> >
>
> Looking at the documentation for Code Conversion I do not see any way to
> convert from Unicode to multibyte. The converter class only works one way
> from multibyte to Unicode. I suppose this falls within the category of
> "not-yet-implemented."

You can convert from unicode to multibyte when performing output, and from
multibyte to unicode when performing input. I thought about implementing the
other directions, but I wasn't sure there was need for them. It certainly can be
done.

> I would like to see converter_impl accept codecvt_type as a template
> argument perhaps with a default of std::codecvt but so that I can replace
> it. const codecvt_type& cvt = codecvt_type() also would be added to the
> converter constructor.

I had it this way originally. I can't remember why I changed. Maybe concerns
over code bloat. But it would certainly make the interface simpler, and
Dinkumware CoreX does it this way, so maybe I'll switch back.

> Regex works this way.

I wasn't aware of this, and can't find a reference in the docs. Could you post a
link?

> The other common code conversion task that is fairly Windows specific but a
> common task nonetheless is to convert \r\n to and from \n in text streams.

See basic_newline_filter (http://tinyurl.com/6x89t) :-)

>
> Regards,
>
> George.
>

Jonathan


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