smls
smls

Reputation: 5791

Disadvantages of using `std::wstring` for Unicode in cross-platform code?

Situation

I have a large existing Win32 C++ code-base, and I want to make it portable so that it compiles and runs on both Windows (MSCV) and Linux (gcc).

For a new project I would try to go UTF-8 Everywhere, but this existing code-base already stores and processes its text in std::wstring as UTF-16.
So I expect to cause less upheaval, and have less risk of breaking existing behavior on Windows, if I keep it that way and try to work with it.

Plan

So this is what text handling would look like once the code-base is cross-platform:

Question

What are the downsides/problems of this approach?

Already considered

Problems I already considered:

But aside from that?

Upvotes: 0

Views: 147

Answers (0)

Related Questions