ioquake / ioq3

The ioquake3 community effort to continue supporting/developing id's Quake III Arena
https://ioquake3.org/
GNU General Public License v2.0
2.42k stars 529 forks source link

Failing to open x64 game in a path with special characters #643

Open h4knet opened 9 months ago

h4knet commented 9 months ago

Hello,

It seems the x64 version of the game won't launch if the path of the executable contains special characters like "éèàç..".

Here is the log file :

ioq3 1.36_GIT_7d711f8-2024-02-17 win_mingw64-x86_64 Feb 17 2024
SSE instruction set enabled
----- FS_Startup -----
We are looking in the current search path:
C:\Users\Clément\AppData\Roaming\Quake3\baseq3
C:\Users\Clément\AppData\Roaming\Quake3\ioquake3\baseq3
c:/program files (x86)/steam\SteamApps\common\Quake 3 Arena\baseq3
C:\Program Files\ModifiableWindowsApps\Quake 3\EN\baseq3

----------------------
0 files in pk3 files

We can see on the first line that the é is read correctly, but not on the second line (where the game actually is on my PC..).

I've moved the folder somewhere else (without special chars) and everything works fine.

h4knet commented 9 months ago

Here is the content of the folder as proof : image

I guess the issue comes from the function : https://github.com/ioquake/ioq3/blob/9881c561ad1796a68ddb88616d7da6d806f29a60/code/qcommon/files.c#L3317

And some mis-encoding ?

zturtleman commented 9 months ago

ioquake3 doesn't support non-ANSI characters in paths on Windows. (This affects all file access, not a single place.) It's also reported at https://github.com/ioquake/ioq3/issues/509.

h4knet commented 9 months ago

Indeed; I guess it’s a duplicate then..

But it’s weird to see the others binaries working (dedicated x64 and x86 game) where the x64 game isn’t.

maybe there could be an « easy » fix somewhere as the first line of log was written correctly ?