-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win11 create log failed #2510
Comments
There is no specification in the C++ standard specification that the character encoding of string literals in source code is UTF-8. It is platform dependent. If you are building with MSVC, please make sure that the characters in the source code are interpreted as UTF-8 by specifying the |
Since the Windows directory separator is |
I don't think that's the problem.
|
So do executing user have write permission to |
As per the error message, the file path string you are passing to spdlog contains a byte sequence that is considered invalid in the character encoding expected by the OS. The Qt documentation says that The character encoding that the Windows API expects for |
What happens if you define following setting |
If |
Thank you very much. It is confirmed that it is a |
The utf-8 code used by my qt program code.When I use spdlog, it failed to create a log file under the Win11 Chinese user name.
demo code:
The QMessageBox display path is normal, but the spdlog displays garbled code.
The text was updated successfully, but these errors were encountered: