Closed Bug 431353 Opened 17 years ago Closed 17 years ago

Wrong wraping comment with utf8 text

Categories

(Bugzilla :: User Interface, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 363153

People

(Reporter: alexey.gaidukov, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Bugzilla 3.0.3 with Perl 5.8, Windows 2003. UTF8 support is switched on. Bugzilla wraps comments with multibyte utf-8 symbols as text with only one-byte ascii symbols. You can see that in the https://bugzilla.mozilla-russia.org/ comments are half shorter then in the https://bugzilla.mozilla.org. Reproducible: Always Steps to Reproduce: 1. Write any comment with more then 40 russian symbols. 2. Open the bug in a browser Actual Results: All comment's lines will be wrapped at about COMMENT_COLS / 2 columns. Expected Results: Comment's lines should have length of no more then COMMENT_COLS columns. Simple workaround is to turn on the UTF-8 flag in $comment variable in function wrap_comment (file Bugzilla\Util.pm). sub wrap_comment { my ($comment) = @_; my $wrappedcomment = ""; Encode::_utf8_on($comment); # Use 'local', as recommended by Text::Wrap's perldoc. ... ... Encode::_utf8_off($wrappedcomment); return $wrappedcomment; }
This problem is fixed in Bugzilla 3.2. No backport is planned on 3.0 due to heavy changes it involves. As a workaround, you could increase the value of COMMENT_COLS in your installation. This would be a problem if someone types a comment in ASCII, though, as the comment would be too large. Maybe try to find an acceptable value for COMMENT_COLS considering both testcases?
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.