Is wchar_t needed for unicode support?

前端 未结 8 1449
情书的邮戳
情书的邮戳 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:19

    wchar_t is not required. It's not even guaranteed to have a specific encoding. The point is to provide a data type that represents the wide characters native to your system, similar to char representing native characters. On Windows, for example, you can use wchar_t to access the wide character Win32 API functions.

提交回复
热议问题