Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2011-04-26 18:05:25 +0000
committerGrant Gayed2011-04-26 18:05:25 +0000
commitad22f502550d7e77c73a980f657ed42a37d6cd00 (patch)
treed8a9896eb802d126fc2f9f945ccd1530a00eee1a
parentc679e3f852dd79216cc8c66726bbc8cb248c474c (diff)
downloadeclipse.platform.swt-ad22f502550d7e77c73a980f657ed42a37d6cd00.tar.gz
eclipse.platform.swt-ad22f502550d7e77c73a980f657ed42a37d6cd00.tar.xz
eclipse.platform.swt-ad22f502550d7e77c73a980f657ed42a37d6cd00.zip
343349 - DBCS characters cannot be viewed properly using internal browser
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java1
2 files changed, 5 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..a71175883a 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,9 @@ 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);
+ String encoding = System.getProperty ("file.encoding"); // $NON-NLS-1$
+ byte[] bytes = Converter.wcsToMbcs (null, encoding, true);
+ OS.g_object_set (settings, WebKitGTK.default_encoding, bytes, 0);
Listener listener = new Listener () {
public void handleEvent (Event event) {
@@ -538,7 +541,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