ExternalTextResourceGenerator is locale/machine-dependent.

Fixes issue 5200.

Patch by: t.broyer
Review at: https://gwt-code-reviews.appspot.com/1716804/


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11044 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java b/user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java
index 7bb445e..0430759 100644
--- a/user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java
+++ b/user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java
@@ -105,7 +105,7 @@
 
     urlExpression = context.deploy(
         context.getClientBundleType().getQualifiedSourceName().replace('.', '_')
-            + "_jsonbundle.txt", "text/plain", wrappedData.toString().getBytes(), true);
+            + "_jsonbundle.txt", "text/plain", Util.getBytes(wrappedData.toString()), true);
 
     TypeOracle typeOracle = context.getGeneratorContext().getTypeOracle();
     JClassType stringType = typeOracle.findType(String.class.getName());
@@ -171,7 +171,7 @@
   }
 
   private String getMd5HashOfData() {
-    return Util.computeStrongName(data.toString().getBytes());
+    return Util.computeStrongName(Util.getBytes(data.toString()));
   }
 
   private boolean shouldUseJsonp(ResourceContext context, TreeLogger logger) {