Abdelrazak Younes wrote:
Anyway. I think you semi-convinced me that passing "odocstringstream" to
plaintext should be supported :-)
Think of it this way: the LyX core will deal with char32_t
(boost::uint32). A buffer-ed stream (and all LyX's streams are buffered)
stores its data in a streambuf. Storing these data in a streambuf<char>
will involve a conversion on input to the streambuf. That's pointless if
you're subsequently going to extract the data to char32_t again. Storing
the data in a streambuf<char32_t> will result in zero conversions for
such cases and one conversion only when writing the streambuf contents
to file.
Altogether, it's the correct thing to do. The LyX core should eventually
know almost nothing about 8 bit chars. The downside is that this
solution requires a char_traits<char32_t>. If the system one isn't
suitable LyX will need its own version.
Angus
- Re: stream problem - help needed Angus Leeming
-