[Webkit-unassigned] [Bug 22488] New: Make DRT smarter about charset encoding when post-processing webarchive content
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 25 10:48:45 PST 2008
https://bugs.webkit.org/show_bug.cgi?id=22488
Summary: Make DRT smarter about charset encoding when post-
processing webarchive content
Product: WebKit
Version: 523.x (Safari 3)
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ddkilzer at webkit.org
CC: ap at webkit.org, mrowe at apple.com, sam at webkit.org,
koivisto at iki.fi
* SUMMARY
When attempting to create a layout test for Bug 22466, I tried moving
fast/encoding/preload-encoding.html to an http test. After setting the charset
encoding for the "gb2312" files using a .htaccess file, I found that DRT would
crash in convertWebResourceDataToString() because dataAsString was nil using
the hard-coded UTF-8 encoding:
NSString *dataAsString = [[[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding] autorelease];
[resource setObject:dataAsString forKey:@"WebResourceData"];
* THE FIX
The better way to do this is to:
1. Attempt to convert the IANA charset into an NSStringEncoding value.
2. Check that dataAsString is non-nil before replacing it in the dictionary.
Instead of crashing, the worst that will happen is that the string data won't
be decoded in the webarchive test output.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list