Is wchar_t needed for unicode support?

前端 未结 8 1441
情书的邮戳
情书的邮戳 2020-12-01 03:49

Is the wchar_t type required for unicode support? If not then what\'s the point of this multibyte type? Why would you use wchar_t when you could accomplish the

8条回答
  •  爱一瞬间的悲伤
    2020-12-01 04:04

    wchar_t is absolutely NOT required for Unicode. UTF-8 for example, maintains backward compatibility with ASCII and uses plain 8-bit char. wchar_t mostly yields support for so-called multi-byte characters, or basically any character set that's encoded using more than the sizeof(char).

提交回复
热议问题