Added recode.pl to fix Bug 2000203#150
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new contrib/recode.pl command-line utility intended to recode Bugzilla database text columns into UTF-8 (optionally guessing per-row encodings) to address Bug 2000203.
Changes:
- Introduces
contrib/recode.plto scan DB tables/columns and update non-UTF-8 text rows to UTF-8. - Supports
--guess,--charset,--dry-run,--show-failures, and--overridesto control/inspect conversions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
My apologies to @MartijnRas for the amount of stuff CoPilot found. It doesn't know you were copying an existing script from elsewhere so it audited the entire script instead of just your changes to it. But most of it is stuff we should probably fix anyway, if you don't mind. |
|
@MartijnRas if you're okay with it, I can commit the suggested fixes from CoPilot. I agree with them, except for the one I resolved already because it was misinformed. :-) (but it's our fault it was misinformed and that's a different bug) |
|
Yes, please commit the changes. I have not had the time to attempt a new
upgrade for the past couple of months, but will do so somewhere in the next
fortnight.
Op vrijdag 5 juni 2026 schreef Dave Miller ***@***.***>:
… *justdave* left a comment (bugzilla/harmony#150)
<#150 (comment)>
@MartijnRas <https://github.com/MartijnRas> if you're okay with it, I can
commit the suggested fixes from CoPilot. I agree with them, except for the
one I resolved already because it was misinformed. :-) (but it's our fault
it was misinformed and that's a different bug)
—
Reply to this email directly, view it on GitHub
<#150?email_source=notifications&email_token=AAA4LAEHHGXICK6WXOGYLZD46JWELA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSHEYDGMJQGEZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4629031012>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4LAAU6ZEPHC4W2IS35N346JWELAVCNFSM6AAAAACZ3MWFMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMMRZGAZTCMBRGI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAA4LAAWIIOZVPAVM2OETBD46JWELA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSHEYDGMJQGEZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AAA4LABQBOIZ3JGATKG7AWT46JWELA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSHEYDGMJQGEZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
justdave
left a comment
There was a problem hiding this comment.
I don't have an old database to test this on and I'm not sure where to find one. A visual look at the code looks like it's doing the right thing. We'll have to depend on someone trying it out to tell us if it really works. And it's in contrib which technically means it's unmaintained....
|
I have one and will test sometime in the next fortnight on my system. While
I'm at it I can also generate a new database. What kind of data do you want
in that database? Simply a number of random bugs?
Op zaterdag 6 juni 2026 schreef Dave Miller ***@***.***>:
… ***@***.**** approved this pull request.
I don't have an old database to test this on and I'm not sure where to
find one. A visual look at the code looks like it's doing the right thing.
We'll have to depend on someone trying it out to tell us if it really
works. And it's in contrib which technically means it's unmaintained....
—
Reply to this email directly, view it on GitHub
<#150?email_source=notifications&email_token=AAA4LADN6ENVNAIMWBLY2O346NAAFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINBUGAYDKMJRG4Z2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#pullrequestreview-4440051173>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4LAGARKQLCPOPSTFYKVT46NAAFAVCNFSM6AAAAACZ3MWFMCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DINBQGA2TCMJXGM>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAA4LAAE5OSMKXEL4X6X6YL46NAAFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINBUGAYDKMJRG4Z2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AAA4LAFEMKUA62TAJDGZECT46NAAFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINBUGAYDKMJRG4Z2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
For testing this script in particular having summaries and descriptions that are in random character sets from a MySQL that's too old to enforce it would be the stuff the script is aiming to fix. |
Details
This PR fixes/adds a feature...
Additional info
NOTE: Bug number is required. If you haven't filed a bug on https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla yet, don't submit the Pull Request. Please edit the above link to put the bug number both immediately after the # character and after the = character at the end. You can delete this paragraph once you've added your bug number.
Test Plan