Summary: | ruby1.9 fails in PrettyPatch.rb with invalid byte sequence in UTF-8 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Pena <spenap> | ||||||
Component: | Tools / Tests | Assignee: | Simon Pena <spenap> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cmarcelo, morrita, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Simon Pena
2012-07-13 03:58:17 PDT
CCing Caio, who added the normalize_line_ending method originally. Created attachment 152212 [details]
Patch
(In reply to comment #2) > Created an attachment (id=152212) [details] > Patch I've attached a patch using Iconv, although, as mentioned in comment #0, it should be better to use String#encode. (In reply to comment #3) > (In reply to comment #2) > > Created an attachment (id=152212) [details] [details] > > Patch > > I've attached a patch using Iconv, although, as mentioned in comment #0, it should be better to use String#encode. Let's do what you think the best :-) Comment on attachment 152212 [details]
Patch
OK, I'll try to come up with a proper fix later.
Created attachment 166628 [details]
Patch
This new version of the patch uses the "proper" implementation when Ruby's version is >= 1.9 (using the string encode method) and keeps the current one for 1.8. Comment on attachment 166628 [details]
Patch
Wow, I didn't know that encode() support :fallback option.
Comment on attachment 166628 [details] Patch Clearing flags on attachment: 166628 Committed r130276: <http://trac.webkit.org/changeset/130276> All reviewed patches have been landed. Closing bug. |