[Webkit-unassigned] [Bug 75394] “Formatted Diff” view mangles non-ASCII characters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 21 23:22:07 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=75394


Kent Tamura <tkent at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |haraken at chromium.org,
                   |                            |tkent at chromium.org




--- Comment #1 from Kent Tamura <tkent at chromium.org>  2012-03-21 23:22:06 PST ---
Bugzilla.pm:
> sub init_page {
>     (binmode STDOUT, ':utf8') if Bugzilla->params->{'utf8'};

attachment.cgi sub prettyPatch:
>    open2(\*OUT, \*IN, "/usr/bin/ruby", "-I", "PrettyPatch", "PrettyPatch/prettify.rb", "--html-exceptions");
>    $ENV{'PATH'} = $orig_path;
>    print IN $attachment->data;
>    close(IN);
>    while (<OUT>) {
>        print;
>    }
>    close(OUT);

I guess OUT works as binary, and "print" converts a binary line to UTF-8 because of binmode.
Probably utf8::decode($_); before print fixes this?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list