Dreikblack Posted 20 hours ago Share Posted 20 hours ago 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 16 hours ago Share Posted 16 hours ago 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 16 hours ago Author Share Posted 16 hours ago 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 16 hours ago Solution Share Posted 16 hours ago 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.