Boost logo

Boost :

From: Miro Jurisic (macdev_at_[hidden])
Date: 2004-10-22 12:03:15

In article <uoeiuu4n6.fsf_at_[hidden]>,
 David Abrahams <dave_at_[hidden]> wrote:

> Is this going to be illegal for most fs, then?
> std::copy(
> std::istream_iterator<char>(f), std::istream_iterator<char>(),
> std::back_inserter(my_utf8_string));
> I think it pretty much has to work.

I think this is a red herring. A UTF-8 string is not a sequence of chars, nor is
every char convertible to a UTF-8 char, so why should this work any more than

vector<void*> my_vector;

         std::istream_iterator<char>(f), std::istream_iterator<char>(),


OTOH, A UTF-8 string is a sequence of Unicode chars, so what should work is:


with the semantics that every time you hit the iterator, an entire unicode
character is read off the stream and appended to the string.


Boost list run by bdawes at, gregod at, cpdaniel at, john at