RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.02k stars 178 forks source link

Cannot create user directory if Windows username contains special characters #2353

Open CuriousMike56 opened 5 years ago

CuriousMike56 commented 5 years ago

If your Windows account username contains a special character (e.g. Miké) RoR will fail to create the Documents\Rigs of Rods 0.4 directory: image Oddly enough, it creates the folders but fails to write any files.

ohlidalp commented 5 years ago

I just tested with username Žluťo:

Ogre: Added resource location 'C:\Users\Žluťo\Documents\Rigs of Rods 0.4\' of type 'FileSystem' to resource group 'DstRG'
Exception thrown at 0x000007FEFD5ABDFD in RoR.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x000000000019CD60.

That's not going to work :smile:

System: Win7 x64 SP1, ANSI code page: mid-european (cp1250) Build: Visual Studio 2017, x64 Debug I've done research before: https://github.com/only-a-ptr/filepaths4rigs/blob/master/doc/MS_WINDOWS.md

paroj commented 5 years ago

does this help? https://github.com/OGRECave/ogre/blob/master/OgreMain/src/OgreFileSystem.cpp#L48

ohlidalp commented 5 years ago

Apparently we're not the only ones with this issue. I just tried to build and run under dummy account with diacritics:

Conan executing: conan install C:/Users/Žluťo/source/rigs-of-rods/conanfile.txt -s arch=x86_64 -s build_type=Debug -s compiler=Visual Studio -s compiler.version=15 -s compiler.runtime=MDd -g=cmake --build=missing
ERROR: Conanfile not found at C:/Users/�luto/source/rigs-of-rods/conanfile.txt

CMake Error at cmake/3rdparty/conan.cmake:399 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  cmake/3rdparty/conan.cmake:485 (conan_cmake_install)
  cmake/DependenciesConfig.cmake:32 (conan_cmake_run)
  CMakeLists.txt:101 (include)

I'll investigate this when I have time, for now I'll build outside the userdir.

ohlidalp commented 5 years ago

@paroj I tested the flag and it works! I drafted a pull request for it: https://github.com/RigsOfRods/rigs-of-rods/pull/2373

AnotherFoxGuy commented 3 years ago

This is still an issue in 2021.02