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

Error decoding filenames for non ascii characters. #88

Closed
MugurAnghel opened this issue Apr 20, 2022 · 2 comments
Closed

Error decoding filenames for non ascii characters. #88

MugurAnghel opened this issue Apr 20, 2022 · 2 comments

Comments

@MugurAnghel
Copy link

MugurAnghel commented Apr 20, 2022

There are issues with ISO files created by PowerISO that contain files that use non ascii characters. For example I stumbled upon a sample with Vietnamese letters. This causes pycdlib to crash with UnicodeDecodeError: 'utf8' codec can't decode byte 0xea in position 1: invalid continuation byte

The encoding used appears to be latin-1 in this scenario, however the parser does not seem to pick this up. I believe relaxing the decoding scheme ( errors='ignore' ) could potentially solve (at least partially) the issue. I did not have the chance to test or analyse this in depth (especially for Rock Ridge/Joliet).

I cant attach ISO files in this form but it's quite simple to reproduce:

  1. PowerISo 32 bit -> new image
  2. Add a file (or folders) that contain non standard characters (my sample has "Yêu cầu ưu đãi" in the file name).
  3. Open the file with pycdlib and try to call the walk method. Will result in the error mentioned above.
@clalancette
Copy link
Owner

Yeah, this is similar to #75 . In short, the library currently only uses ASCII encoding, as that is what is called out in the specification. We can probably lift the restriction pretty easily, but I still haven't been able to create an ISO that has these characters. Every time I try with PowerIso, it won't let me use non-ASCII characters. I'll try again at some point.

@clalancette
Copy link
Owner

So I finally got a chance to look at this, and I think with the changes that I made for #75, this is now fixed. That said, I ended up adding in a specific test for Vietnamese in 312f19a .

With all of that said, I'm going to close this out. Feel free to reopen if you think this is still a problem.

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

2 participants