[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] pyg_mixer.music.load doesn't take non ascii chars



I am trying to open an ogg file with:

file_path = "07-Boabdil, Bulerías.ogg"
 pygame.mixer.music.load(file_path)

But I get an Error message saying that one of the unicode characters
 are out of range and can not be encoded. If I remove the offending
character the file loads fine so I assume the problem is that only ascii
is accepted.

Since os.exists(file_path) evaluates as true I tried using the following:

file_path = "07-Boabdil, Bulerías.ogg"
fi = open(file_path, 'rb').read()
pygame.mixer.music.load(fi)

But that gets me the Error:
"File path 'OggS' contains null characters"

Am I doing something wrong or is there no way
to open a soundfile with non ascii characters ?
I am running pygame on Windows 7.

Bo Jangeborg