Boost logo

Boost :

Subject: Re: [boost] Boost.Process 0.5: Another update/potential candidate for an official library
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2012-11-15 12:38:38


Alex, I'm sorry, but I cannot make sense of what you write.

On Thu, Nov 15, 2012 at 6:06 PM, Alex Perry <Alex.Perry_at_[hidden]>wrote:

> [...] its functionality - if I have to call out to foo and this expects 8
> bit encoded filenames (or more likely on windows utf16) then I need to be
> able to do that

What is foo? I assume you mean that foo is some executable. In such case it
does not matter what it expects, 8 bit encoded command line or UTF-16
command line, since both are passed through the kernel as UTF-16 strings.

> - and so if passing a "command line style call " must tell the boost
> process library what encoding my std::string actually is in some manner so
> that it can apply the correct transformation required.
>

If we recognize that boost process must support Unicode, then it *must*
call CreateProcessW. So the only question is what encoding of std::strings
it assumes. There are two alternatives on Windows: 1) ANSI 2) UTF-8. The
former does not support Unicode, the later is incompatible with the basic
execution character set of MSVC compiler. This is not a problem though, you
are not required to be compatible with the standard library here. Also it
is easy to change between the two based on a compile time switch.

My problem with this is that its confusing ...

What is confusing? Defining a uniform interface is confusing?

> so my original point was lets not try to model boost process on the
> system() call - that exists on all platforms I know of but doesn't really
> address the issues of writing x-platform code to handle processes.
>

I totally lost you here. How system() is related? (Except that it launches
a process too.)

-- 
Yakov

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