diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ClassgroupRetryController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ClassgroupRetryController.java index c11f66c96..236c2c38f 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ClassgroupRetryController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ClassgroupRetryController.java @@ -65,13 +65,10 @@ public class ClassgroupRetryController extends BaseEditController { } catch (NullPointerException e) { log.error("Need to implement 'record not found' error message."); } - if (vclassGroupForEditing == null) { - try { - String uriToFind = new String(request.getParameter("uri").getBytes("ISO-8859-1"),"UTF-8"); - vclassGroupForEditing = (VClassGroup)cgDao.getGroupByURI(uriToFind); - } catch (java.io.UnsupportedEncodingException uee) { - // forget it - } + if (vclassGroupForEditing == null) { + //UTF-8 expected due to URIEncoding on Connector in server.xml + String uriToFind = new String(request.getParameter("uri")); + vclassGroupForEditing = (VClassGroup)cgDao.getGroupByURI(uriToFind); } } else { vclassGroupForEditing = new VClassGroup(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyGroupRetryController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyGroupRetryController.java index 362457344..0eeb5dc28 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyGroupRetryController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyGroupRetryController.java @@ -65,12 +65,9 @@ public class PropertyGroupRetryController extends BaseEditController { log.error("Need to implement 'record not found' error message."); } if (propertyGroupForEditing == null) { - try { - String uriToFind = new String(request.getParameter("uri").getBytes("ISO-8859-1"),"UTF-8"); - propertyGroupForEditing = (PropertyGroup)pgDao.getGroupByURI(uriToFind); - } catch (java.io.UnsupportedEncodingException uee) { - // forget it - } + // UTF-8 expected due to URIEncoding on Connector element in server.xml + String uriToFind = new String(request.getParameter("uri")); + propertyGroupForEditing = (PropertyGroup)pgDao.getGroupByURI(uriToFind); } } else { propertyGroupForEditing = new PropertyGroup(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java index fe7555d35..17ad1fd0b 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java @@ -242,7 +242,7 @@ public abstract class FreemarkerConfiguration { * URL? */ try { - c.setSetting("url_escaping_charset", "ISO-8859-1"); + c.setSetting("url_escaping_charset", "UTF-8"); } catch (TemplateException e) { log.error("Error setting value for url_escaping_charset."); }