More fixes to loading template/script files

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6201 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2007-07-09 16:19:29 +00:00
parent d533004036
commit 8773d4b4a0
2 changed files with 22 additions and 3 deletions

View File

@@ -34,9 +34,11 @@ import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.service.cmr.repository.ScriptLocation;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.ClassPathResource;
@@ -322,7 +324,14 @@ public class ClassPathStore implements WebScriptStore, InitializingBean
*/
public Reader getReader()
{
return new InputStreamReader(getInputStream());
try
{
return new InputStreamReader(getInputStream(), "UTF-8");
}
catch (UnsupportedEncodingException e)
{
throw new AlfrescoRuntimeException("Unsupported Encoding", e);
}
}
@Override