Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2011-04-27 15:05:43 +0000
committerGrant Gayed2011-04-27 15:05:43 +0000
commit27a1ed4b12a30c09b5f5cf85f34fcc99920dce49 (patch)
tree5358aebd1655ce0aa015c04ee0ee3e64873fce71 /bundles/org.eclipse.swt/Eclipse SWT WebKit
parentce82e17dea822ccabe6be7e6ae4f983f83d4affc (diff)
downloadeclipse.platform.swt-27a1ed4b12a30c09b5f5cf85f34fcc99920dce49.tar.gz
eclipse.platform.swt-27a1ed4b12a30c09b5f5cf85f34fcc99920dce49.tar.xz
eclipse.platform.swt-27a1ed4b12a30c09b5f5cf85f34fcc99920dce49.zip
343349 - DBCS characters cannot be viewed properly using internal browser
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java1
2 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index a345c35c88..7dbab46864 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -475,6 +475,8 @@ public void create (Composite parent, int style) {
int /*long*/ settings = WebKitGTK.webkit_web_view_get_settings (webView);
OS.g_object_set (settings, WebKitGTK.javascript_can_open_windows_automatically, 1, 0);
OS.g_object_set (settings, WebKitGTK.enable_universal_access_from_file_uris, 1, 0);
+ byte[] bytes = Converter.wcsToMbcs (null, "UTF-8", true); // $NON-NLS-1$
+ OS.g_object_set (settings, WebKitGTK.default_encoding, bytes, 0);
Listener listener = new Listener () {
public void handleEvent (Event event) {
@@ -538,7 +540,7 @@ public void create (Composite parent, int style) {
proxyHost = PROTOCOL_HTTP + proxyHost;
}
proxyHost += ":" + port; //$NON-NLS-1$
- byte[] bytes = Converter.wcsToMbcs (null, proxyHost, true);
+ bytes = Converter.wcsToMbcs (null, proxyHost, true);
int /*long*/ uri = WebKitGTK.soup_uri_new (bytes);
if (uri != 0) {
OS.g_object_set (session, WebKitGTK.SOUP_SESSION_PROXY_URI, uri, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
index 0b1717ee96..08c7d7fca8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
@@ -52,6 +52,7 @@ public class WebKitGTK extends C {
public static final byte[] window_object_cleared = ascii ("window-object-cleared"); // $NON-NLS-1$
/** Properties */
+ public static final byte[] default_encoding = ascii ("default-encoding"); // $NON-NLS-1$
public static final byte[] enable_scripts = ascii ("enable-scripts"); // $NON-NLS-1$
public static final byte[] enable_universal_access_from_file_uris = ascii ("enable-universal-access-from-file-uris"); // $NON-NLS-1$
public static final byte[] height = ascii ("height"); // $NON-NLS-1$

Back to the top