[Webkit-unassigned] [Bug 91212] New: ruby1.9 fails in PrettyPatch.rb with invalid byte sequence in UTF-8

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 13 03:58:17 PDT 2012


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

           Summary: ruby1.9 fails in PrettyPatch.rb with invalid byte
                    sequence in UTF-8
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: spena at igalia.com


After upgrading the setup in one of the GTK 64bits bots, we found that if ruby1.9 is used instead of ruby1.8, the following error happens when running test-webkitpy:

/home/spenap/Projects/WebKit/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:108:in `gsub': invalid byte sequence in UTF-8 (ArgumentError)
    from /home/spenap/Projects/WebKit/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:108:in `normalize_line_ending'
    from /home/spenap/Projects/WebKit/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:19:in `prettify'
    from /home/spenap/Projects/WebKit/Websites/bugs.webkit.org/PrettyPatch/prettify.rb:26:in `<main>'

This is caused by the new encoding engine that Ruby 1.9 uses (see http://blog.grayproductions.net/articles/ruby_19s_string)

I took a look at http://smyck.net/2011/05/13/files-with-mixed-and-invalid-encodings-in-ruby/ to work around it, but iconv will be deprecated in the future, and String#encode is recommended instead. However, by looking at http://blog.segment7.net/2010/12/17/from-iconv-iconv-to-string-encode, the new alternative is not as straight-forward as using iconv.

We're currently keeping ruby in version 1.8, which works as expected.

-- 
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