Repository navigation
[tracer] The tests write a zip's UTF-8 names in a UTF-8 locale, which FreeBSD's libarchive needs - #49
Merged
Conversation
… FreeBSD's libarchive needs Signed-off-by: AO55 <AO55@reden-emu.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deploy of #45, #46 and #48 stopped at the FreeBSD build's tests: 1486 of 1488 checks passed in the
scarletnxjail on devola. The two that failed read a zip's namecaptura_é, and gotcaptura_?.The reader is not at fault. The tests' own
zip_bytes()writes its zips with libarchive in the C locale a test runs in. In thescarletnxjail (FreeBSD 15.1, libarchive 3.8.7), the writer turnséinto?in that locale, even withhdrcharset=UTF-8. glibc's libarchive writes the bytes as they are, so Linux never saw it. Measured in the jail:captura_uselocale(C.UTF-8)3f 2ecaptura_?.pnguselocale(C.UTF-8)c3 a9captura_é.pngReading a zip written with the name's bytes gives
captura_é.png, with the archive opened in the C locale or in C.UTF-8. That isnames_utf8()astr_zip_next()uses it.zip_bytes()now writes its names underuselocale(C.UTF-8)and puts the thread's locale back after. Only the tests change.make testintracer/, Linux: 1491 of 1491.scarletnxjail: 1488 of 1488.