Skip to content

Conversation

@alexanderadam
Copy link

@alexanderadam alexanderadam commented Oct 13, 2025

hi folks,

this should at least solve the PDF issue seen in issue 77 (third comment).
I created a 'bad' PDF containing wmv (see strings test/fixtures/name/application/pdf/wmv.pdf | rg wmv2).

And with unicodeBE and unicodeLe support, wmv and wma files aren't mistakenly identified as video/x-ms-asf (it's not wrong since they're using ASF but it's not the quite specific type).

However, keep in mind that I while I attached some fixtures, I didn't includea valid zip file containing wmv2 (see the first comment in the issue).
I'd assume that this is also solved by this PR but I don't know how to properly reproduce a valid zip file containing the string without brute forcing tbh. 🔨

Furthermore it also resolves the audio2.mp3 case of issue #125

PS: I'm looking for a new adventure in case anybody is looking to hire or work with a Ruby/Rails/Crystal dev

This should at least resolve the issue seen in rails#77.
I created a 'bad' PDF containing 'wmv' (see `strings test/fixtures/name/application/pdf/wmv.pdf | rg wmv2`).

And with `unicodeBE` and `unicodeLe` support, `wmv` and `wma` files aren't mistakenly identified as `video/x-ms-asf` (it's not wrong since they're using ASF but it's not the quite specific type).

Furthermore it also resolves the `audio2.mp3` case of issue rails#125
@alexanderadam alexanderadam force-pushed the feat/add_unicode_string_type_support branch from 8c94785 to 2b19be7 Compare October 13, 2025 14:58
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

Successfully merging this pull request may close these issues.

1 participant