### Eclipse Workspace Patch 1.0
#P org.eclipse.wst.html.core
diff --git META-INF/MANIFEST.MF META-INF/MANIFEST.MF
index 4ea31fe..0784802 100644
--- META-INF/MANIFEST.MF
+++ META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.html.core; singleton:=true
-Bundle-Version: 1.1.602.qualifier
+Bundle-Version: 1.1.602.v201301032305-20130302
 Bundle-Activator: org.eclipse.wst.html.core.internal.HTMLCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -28,7 +28,8 @@
  org.eclipse.wst.html.core.internal.validate;x-internal:=true,
  org.eclipse.wst.html.core.internal.validation;x-internal:=true,
  org.eclipse.wst.html.core.text
-Import-Package: com.ibm.icu.util; version="3.8"
+Import-Package: com.ibm.icu.util; version="3.8",
+ org.mozilla.universalchardet
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,2.0.0)",
diff --git src/org/eclipse/wst/html/core/internal/contenttype/EncodingGuesser.java src/org/eclipse/wst/html/core/internal/contenttype/EncodingGuesser.java
index 7656fba..9cec038 100644
--- src/org/eclipse/wst/html/core/internal/contenttype/EncodingGuesser.java
+++ src/org/eclipse/wst/html/core/internal/contenttype/EncodingGuesser.java
@@ -12,6 +12,8 @@
  *******************************************************************************/
 package org.eclipse.wst.html.core.internal.contenttype;
 
+import org.mozilla.universalchardet.UniversalDetector;
+
 /**
  * 
  * This is ported from PageDesigner's hpbcom/Kanji.cpp's
@@ -109,10 +111,29 @@
 	 * length of target
 	 */
 	public static String guessEncoding(byte[] target, int length) {
+		if (System
+				.getProperty("org.eclipse.wst.html.core.disableGuessEncoding") != null) {
+			return null;
+		}
+		boolean avoidBUG = true;
+
 		int code = UNKNOWN;
 
-		
 		if (canGuess()) {
+			if (avoidBUG) {
+				while (length > 0) {
+					if (target[--length] != -1) {
+						length++;
+						break;
+					}
+				}
+				UniversalDetector detector = new UniversalDetector(null);
+				detector.handleData(target, 0, length);
+				detector.dataEnd();
+				String charset = detector.getDetectedCharset();
+				detector.reset();
+				return charset;
+			}
 			// Ok, I'm under ja_JP.
 			code = ASCII;
 			int pos = 0;