-
Notifications
You must be signed in to change notification settings - Fork 183
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
Support for wide-chars as casual calls to i.e. GetDirectory functions are LPWSTR #6
Comments
ok, im not very familiar with wide chars. can you propose a PR ? |
if i change all std::string to std::wstring and char to WCHAR i break ImGui, who is not supproting wide char for the moment. |
switch : * GetFullPathName to GetFullPathNameA * CreateDirectory to CreateDirectoryA * GetLogicalDriveStrings to GetLogicalDriveStringsA by ex with GetLogicalDriveStrings for avoid use of GetLogicalDriveStringsW with the call to GetLogicalDriveStrings if UNICODE is enabled
Wide char version of windows functions should be used, then wide chars are converted to utf-8 so that imgui could use them. When you go from imgui to wide chat filesystem functions you need the opposite conversion. |
if i do in code because i found many issue with wchar in the imgui doc about perf. not sure about the problem and the solution you propose, since i have no more information the best way is, you propose a PR i think |
hello there, i have finally created an implementation with std::filesystem (c++17) of the new ImGuiFileDialog you just need to use this define in the config file #define USE_STD_FILESYSTEM you can test that in the branch : https://github.com/aiekick/ImGuiFileDialog/tree/Lib_Only_Std__FileSystem_WIP as i know the unicode is fully supported now, ( just fixed a bug in the path composer) |
Describe the bug
Currently the code tends to support only ANSI strings- however calls to functions like GetFullPathName or GetLogicalDriveStrings are extended to GetLogicalDriveStringsW, not GetLogicalDriveStringsA- therefore ImGuiFileDialog will crash as it won't expect one-byte char but two-bytes char if strings will be cased to LPCWSTR or LPWSTR
To Reproduce
-/-
Expected behavior
Change all std::string to std::wstring and char to WCHAR
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: