Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2007-09-27 12:22:20


James Porter wrote:
> since std::wfstream just converts ASCII to UTF-16.
>
Just nit-picking here: it converts to wchar_t, which may or may not be
UTF-16. On Win32 platforms, it is, but on Linux, for example, it's UTF-32.
> Variable-width-encoded strings should be fairly straightforward when they
> are immutable, but will probably get hairy when they can be modified.
>
True. I think the strings should be immutable. I think experience with
Java and C# compared to C++ shows that an immutable string class is
superior in most use cases.
> That said, I think a good (general) roadmap for this project would be:
> 1) Extend std::basic_string to store UCS-2 / UCS-4 (should be easy, though
> string constants may pose a problem)
>
Doesn't basic_string<wchar_t> do just that already?

Sebastian Redl


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