Am Freitag, 27. Oktober 2006 09:54 schrieb Jean-Marc Lasgouttes:
> >>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
> 
> Georg> codecvt facets are only used by file streams 
> 
> Is that a limitation of the gcc implmentation, or is it the standard
> that specified such a stupid thing?

The standard.

> Georg> Next try: Maybe we could do something else than codecvt in our
> Georg> streams, and add a setEncoding() method? That does not work
> Georg> unless we rebuild the functionality of file and string streams,
> Georg> since both odocfstream and odocstringstream inherit from
> Georg> std::basic_ostream<docstring> and we can neither add a method
> Georg> to that class nor change the inheritance of the file and string
> Georg> streams.
> 
> Why not implement a  modifier like
>   os << setencoding("iso-8859-1")
> ?

Good idea, then it would not be needed to change the stream classes. By 
overloading one could make sure that the modifier knows the stream type it 
is going to use. I guess that would work, but probably requires to get 
some details right.

> I understand. I see that boost has some intriguing stream stuff. Can
> this be used?
> http://www.boost.org/libs/iostreams/doc/

The last time I looked at it I very much liked the idea but found it too 
complicated to use.


Georg

Reply via email to