[BlackBerry] Web Inspector messages incorrectly converted
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 19:03:38 +0000 (19:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 19:03:38 +0000 (19:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83796

Patch by Konrad Piascik <kpiascik@rim.com> on 2012-04-12
Reviewed by Rob Buis.

The JSON sent over from the remote Web Inspector front-end was being
mis interpreted as ISO-8859-1.  This caused all non ascii characters to
become garbled when using the String constructor, so we use fromtUTF8 instead.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::dispatchInspectorMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114011 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog

index a8d0b4e..45617e3 100644 (file)
@@ -5198,7 +5198,7 @@ void WebPage::disablePasswordEcho()
 
 void WebPage::dispatchInspectorMessage(const std::string& message)
 {
-    String stringMessage(message.c_str(), message.length());
+    String stringMessage = String::fromUTF8(message.data(), message.length());
     d->m_page->inspectorController()->dispatchMessageFromFrontend(stringMessage);
 }
 
index 2558109..09d6810 100644 (file)
@@ -1,3 +1,17 @@
+2012-04-12  Konrad Piascik  <kpiascik@rim.com>
+
+        [BlackBerry] Web Inspector messages incorrectly converted
+        https://bugs.webkit.org/show_bug.cgi?id=83796
+
+        Reviewed by Rob Buis.
+
+        The JSON sent over from the remote Web Inspector front-end was being
+        mis interpreted as ISO-8859-1.  This caused all non ascii characters to
+        become garbled when using the String constructor, so we use fromtUTF8 instead.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
+
 2012-04-12  Mike Fenton  <mifenton@rim.com>
 
         [BlackBerry] Speed up processing of Selection region generation.