Skip to content

Commit

Permalink
Fix utf-8 handling when loading URLs.
Browse files Browse the repository at this point in the history
Don't use a char* to go from BString to WTF::String.
The direct conversion from BString to WTF::String assumes the data is
already UTF-8 encoded. The WTF::String constructor from char*, on the
other hand, assumes ISO-8859-15, and mangles the characters.

This gets google searches with UTF-8 characters working and fixes #7272.
  • Loading branch information
pulkomandy committed Jan 13, 2014
1 parent d48a0fc commit aa592b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebKit/haiku/API/WebFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void BWebFrame::LoadURL(BString urlString)
url.setProtocol("file");
url.setPath(urlString);
} else
url = WebCore::URL(WebCore::URL(), urlString.Trim().String());
url = WebCore::URL(WebCore::URL(), urlString.Trim());

if (!url.protocolIsInHTTPFamily() && !url.isLocalFile()) {
url = WebCore::URL();
Expand Down

0 comments on commit aa592b8

Please sign in to comment.