简体   繁体   中英

wchar_t and POSIX library

There is the POSIX library in c++ support wchar_t? if not, then how is it possible to solve this problem?

For example, I need open opendir(wchar_t*)

There's no POSIX wchar_t version of opendir. Your platform may have one if you are lucky. Otherwise, you'll have to use something like the iconv library to convert your wide character string into UTF-8 (or whatever character encoding your file system API uses).

It's not clear exactly what you're asking.

POSIX incorporates the C standard as a base document, and the C standard specifies wchar_t and numerous functions that operate on wchar_t values. So in this sense, wchar_t is certainly suppported by POSIX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM