Skip to content
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

sound.PlayFile fails with unicode file names #2304

Open
samuelmaddock opened this issue Dec 5, 2015 · 2 comments
Open

sound.PlayFile fails with unicode file names #2304

samuelmaddock opened this issue Dec 5, 2015 · 2 comments

Comments

@samuelmaddock
Copy link

Steps to reproduce:

  1. Copy audio file into garrysmod/sound folder (or anywhere really).
  2. Rename file to contain unicode characters (e.g. マ.mp3).
  3. Run the following command in-game:
lua_run_cl sound.PlayFile( "sound/マ.mp3", "", print )

BASS_StreamCreateFile supports a BASS_UNICODE flag which likely needs to be set.

@robotboy655
Copy link
Contributor

The issue is actually that the engines' filesystem fails to open files with such names, specifically fopen on Windows.

@Kefta
Copy link
Contributor

Kefta commented Sep 22, 2023

https://stackoverflow.com/questions/23285759/fopen-file-name-with-utf8-string-in-windows (last answer) - don't imagine open() has the same issue for posix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants