How does Microsoft handle the fact that UTF-16 is a variable length encoding in their C++ standard library implementation

前端 未结 5 2423
小蘑菇
小蘑菇 2021-02-20 08:48

Having a variable length encoding is indirectly forbidden in the standard.

So I have several questions:

How is the following part of the standard handled?

5条回答
  •  情书的邮戳
    2021-02-20 09:32

    Assuming that you're talking about the wstring type, there would be no handling of the encoding - it just deals with wchar_t elements without knowing anything about the encoding. It's just a sequence of wchar_t's. You'll need to deal with encoding issues using functionality of other functions.

提交回复
热议问题