Dreikblack Posted December 3, 2024 Share Posted December 3, 2024 ReadFile is not loading a file, if path contain non-latin (or at least Cirycilic) symbols. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto stream = ReadFile("Тест/Test.txt"); if (!stream) { Print("Fail to load"); } else { WString text = stream->ReadString(); Print(text); } return 0; } Тест.zip Quote Link to comment Share on other sites More sharing options...
Josh Posted December 3, 2024 Share Posted December 3, 2024 You must specify a wide string: auto stream = ReadFile(L"Тест/Test.txt"); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted December 3, 2024 Author Share Posted December 3, 2024 Ah, actually it was AppDir() that failed me in real case. Just found it after a more research. It cut path to non-latin chars. For example Instead of "D:/Workspace/Тест" it returns "D:/Workspace/" Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted December 3, 2024 Solution Share Posted December 3, 2024 Ah, I see why. I fixed that so it will work. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.