r/cpp • • Jul 01 '21

Any Encoding, Ever

https://thephd.dev/any-encoding-ever-ztd-text-unicode-cpp
269 Upvotes

87 comments sorted by

View all comments

24

u/voip_geek Jul 01 '21

Wow, kudos! That looks like a real improvement and a worthy inclusion to the standard library.

Have you considered at least proposing it for boost? I know the process for that can be... challenging, but it would get it in people's hands faster than waiting on a standard, and it would be a useful proving-ground.


As an aside, and please don't take this the wrong way: while I laugh at your digs at The Committee and appreciate it for the humor I think it's intended to be, I'm not sure it helps your cause. There are some people who take offense at such things, and I think it works against you. There are people from very different cultures involved, who don't share the same type of humor.

At the end of the day you have to ask yourself: "what's my goal?"

Is it to make blog posts more entertaining? Or is it to effect real change in C++?

If the latter, then I'd tone down the ranting and just focus on the problem and solution.

Just my 2 cents, and as I said this is just an aside - I'm not a committee member, and I find it humorous. But I've done these types of things in a past life, and my gut tells me it would be better toned down.

15

u/__phantomderp Jul 01 '21

Boost is already getting Boost.Text, and I already submitted a review for that. I don't think the Boost community is something I want to contribute to, though, for a handful of reasons! It'll be an independent library, for now.

5

u/zip117 Jul 01 '21

Boost also has Nowide as well for robust conversions between UTF-16 and UTF-8. It also comes in a standalone version without any Boost dependencies. It’s awesome for Windows interop; I use it in a small library to generate these annoying ‘Pascal’ strings required by the Excel C API. Before that I was stuck with ICU, Win32 (MultiByteToWideChar, WideCharToMultiByte) or depreciated STL (std::wstring_convert, std::codecvt_utf8_utf16).