Closed shiluotang closed 1 month ago
I think what we're seeing is that your filesystem is not using UTF-8, and the problem is that there's really no way to know what the encoding is- you could even use different encoding for different filenames. Say, you could encode filenames according to your current locale, and then change that weekly.
That's really completely untenable. The only practical answer is to use UTF-8 for every locale on Linux.
What we can actually do for you is to ignore the non-ASCII bits when this happens, since what we are looking for is all ASCII anyway. Most legacy encodings we could see are supersets of ASCII, so the ASCII bits are still readable.
Please download this branch here which tries to do this. Just run the bin/lutris
script within- no need to install- and see if that helps.
I'll merge this if it helps. But if I am right, this is a band-aid on a bullet would. You really need to move to UTF-8.
I think what we're seeing is that your filesystem is not using UTF-8, and the problem is that there's really no way to know what the encoding is- you could even use different encoding for different filenames. Say, you could encode filenames according to your current locale, and then change that weekly.
That's really completely untenable. The only practical answer is to use UTF-8 for every locale on Linux.
What we can actually do for you is to ignore the non-ASCII bits when this happens, since what we are looking for is all ASCII anyway. Most legacy encodings we could see are supersets of ASCII, so the ASCII bits are still readable.
Please download this branch here which tries to do this. Just run the
bin/lutris
script within- no need to install- and see if that helps.I'll merge this if it helps. But if I am right, this is a band-aid on a bullet would. You really need to move to UTF-8.
locale
command gives following output LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
So how could it be more UTF-8?
I don't know how I can try your computer's /proc
directory; the error is showing something that's not UTF-8 in there. I am only guess about what it is.
I hope my branch will allow Lutris to just skip over that, whatever it is. Please try it when you can.
I don't know how I can try your computer's
/proc
directory; the error is showing something that's not UTF-8 in there. I am only guess about what it is.I hope my branch will allow Lutris to just skip over that, whatever it is. Please try it when you can.
OK, I've merged it. 0.5.18 should contain the fix, and I believe it will work no matter what the source of the mysterious non-UTF-8 command line data is.
Bug description
lutris can't handle non ascii filename in install script
it give following information on console.
Traceback (most recent call last): File "/usr/share/lutris/bin/lutris-wrapper", line 202, in
main()
File "/usr/share/lutris/bin/lutris-wrapper", line 172, in main
while watcher.is_alive():
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lutris/util/process_watcher.py", line 75, in is_alive
return next(self.iterate_processes(), None) is not None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lutris/util/process_watcher.py", line 65, in iterate_processes
if child.state == 'Z':
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lutris/util/process.py", line 91, in state
_stat = self.get_stat()
^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lutris/util/process.py", line 48, in get_stat
_stat = stat_file.readline()
^^^^^^^^^^^^^^^^^^^^
File "", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 21-22: invalid continuation byte
How to Reproduce
Steps to reproduce the behavior:
More to explain this problem
program to provide non ascii filename
python script to check process state as the process.py does
Expected behavior
lutris can handle installer script with non ascii installer filename
There're some reasons of this problem
Possible solution
Log output
System Information
Media (optional)
No response