Summary: | non-ASCII characters lost on the way from commit-hook into Bugzilla | ||
---|---|---|---|
Product: | Services | Reporter: | Matthias Andree <mandree> |
Component: | Core Infrastructure | Assignee: | Philip Paeps <philip> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | bugmeister, clusteradm, koobs, lwhsu, mat, mva, peter, philip, yuri |
Priority: | --- | Keywords: | easy, needs-patch, needs-qa |
Version: | unspecified | ||
Hardware: | Any | ||
OS: | Any | ||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193682 |
Description
Matthias Andree
2014-09-16 21:24:57 UTC
That should have been https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193682#c3 This might be related due to several issues. The notifier script for example does not declare a content encoding in the mail being generated, which might then be just reencoded/played safe on picking up the mail. I'm adding portmgr@ to keep them informed about the test outcome. Local tests show that it is related to the (missing) content encoding. @portmgr: Can we assume commit messages to be UTF-8 encoded and add a echo 'Content-Type: text/plain; charset="UTF-8"' into hooks/scripts/notify_bz.sh? Otherwise the content encoding is guessed randomly, with a fallback to the executing user's locale. Internally, Subversion stores everything as UTF-8 encoded unicode, or so the SVNBook.red-bean.com claims: <http://svnbook.red-bean.com/en/1.7/svn.tour.importing.html#svn.tour.importing.naming> Now the client (svn) will re-encode according to the locale setting, I'm not sure what svnlook does. So in order to play it safe, you'll probably want to add export LANG=en_US.UTF-8 or more radical and to the point export LC_ALL=en_US.UTF-8 to the notify_bz.sh to enforce the declared encoding (C.UTF-8 or POSIX.UTF-8 causes complaining about svn not being able to set LC_CTYPE). Please test what svnlook renders, I don't currently have a server-side repo at hand. What's the status of this? Did someone of portmgr@ look into the necessary adjustments for notify_bz.sh? portmgr@: is there any progress on this issue? If it's script adjustments, we need to get bugmeister on the hook. Not sure if we can expect much help from portmgr@, so let's just try bugmeister. Sorry - I see that bugmeister reassigned to portmgr in September already. Reverting my changes. Any news on this? Is this an area where non-maintainer commits get reverted? Else it's time for someone else to invoke maintainer timeout and take action. I don't see any patch provided in this bug report, why would timeout be invoked? Also, this probably affects base and docs, it's not specific to ports so I'm not sure portmgr is the right contact (maybe svnadm@ / peter@) (In reply to Antoine Brodin from comment #12) > Also, this probably affects base and docs, it's not specific to ports so > I'm not sure portmgr is the right contact (maybe svnadm@ / peter@) Yes, it will affect all commits, which also write something into Bugzilla. So the problem will be the same for all different source trees, be it ports, doc or base. The issue is (in my opinion) simple to fix (see comment #3) and "only" would have an impact on Bugzilla comments. Should we give a fix a go? Got bitten with it in https://bugs.freebsd.org/196964 so adding me to the CC. @Marcus, is your add code suggestion in comment 3 still valid? If so I can add a patch here. If not, if someone else could that would be great. Who is the maintainer/owner of the SVN hook scripts? We should assign the Product/Component/Assignee accordingly. Spoke to Peter on IRC, over to him (and clusteradm). Thanks Pete! I was planning to make some adjustments to the way bugzilla receives email, I'll take care of this as well. This is still a problem. ^Triage: reassign to bugmeister@. Is this still a case following the Git migration? The Git commit hooks go through a lot more trouble to encode UTF-8 strings. (In reply to Philip Paeps from comment #20) This is still a case after Git migration. Okay. I see the problem. We encode in the notify-mailinglist hook but not in the notify-bugzilla hook. I'll take care of this today. This is simple enough to fix. This is a fake test commit. Sorry for the noise. commit 4338e4d340a02ac85d5ff0e7dfc1320b753c314f Author: 麻煩 <philip@trouble.is> AuthorDate: 2021-06-12 06:51:45 +0000 Commit: Philip Paeps <philip@FreeBSD.org> CommitDate: 2021-06-12 07:00:03 +0000 hooks: test notify-bugzilla with UTF-8 strings This commit message was written in 香港. test (new) | 0 1 file changed, 0 insertions(+), 0 deletions(-) Deployed to the production git server. |