Hi Can,
On Wed, Feb 27, 2019 at 11:22 AM Can Topal via Boost
Mainly I'm trying to implement a STL like support for file reading/writing, I/O operations and memory storage. So a user could read/write and process Unicode text like an ASCII string without knowing how the text is encoded.
To my best knowledge std::string in conjunction with UTF-8 does let you do exactly that -- process Unicode text like an ASCII string without caring for the details. To my best knowledge this covers 95% of use cases of strings. For the rest a fully fledged Unicode library is usually required, whether it's for Unicode normalization, collation, or text rendering. True -- it would be helpful to have good implementation of those on UTF-8 strings. However, wherever you take your design, take care not to introduce yet another string class. You probably shouldn't care where the bytes are stored. You can also look at Boost.Locale and Boost.NoWide. Cheers & Wish you GL,, -- Yakov Galka http://stannum.co.il/