mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixes to loading template/script files from the classpath as UTF-8 by default.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6193 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -163,7 +163,7 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
FileCopyUtils.copy(stream, os); // both streams are closed
|
||||
byte[] bytes = os.toByteArray();
|
||||
|
||||
return executeScriptImpl(resolveScriptImports(new String(bytes)), model);
|
||||
return executeScriptImpl(resolveScriptImports(new String(bytes, "UTF-8")), model);
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
@@ -379,7 +379,7 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
FileCopyUtils.copy(stream, os); // both streams are closed
|
||||
byte[] bytes = os.toByteArray();
|
||||
// create the string from the byte[] using encoding if necessary
|
||||
result = new String(bytes);
|
||||
result = new String(bytes, "UTF-8");
|
||||
}
|
||||
catch (IOException err)
|
||||
{
|
||||
|
Reference in New Issue
Block a user