Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
众所周知,Qt 允许将 c-string(文件路径(Windows),包含西里尔字符)转换为另一种以 UTF-8 编码的字符串,如下所示:
const char *str = "/path/to/some/file.ext"; const char *utf8str = QString(str).toUtf8().constData();
不使用 Qt 我怎么能做到这一点?我可以/应该使用什么 C 或 C++ 库,是否有任何轻量级变体?