From: zapata Date: Sat, 12 Apr 2003 15:29:43 +0000 (+0000) Subject: encoding fixes X-Git-Tag: BEFORE_MERGE_1_1~185 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=fc3c03be0be53c115d05afcd1f4a8335a611e0c7;p=mir.git encoding fixes --- diff --git a/source/Mir.java b/source/Mir.java index 2e4d0e65..ea6a9f35 100755 --- a/source/Mir.java +++ b/source/Mir.java @@ -81,7 +81,7 @@ import mircoders.servlet.*; * Mir.java - main servlet, that dispatches to servletmodules * * @author $Author: zapata $ - * @version $Id: Mir.java,v 1.42 2003/04/09 02:06:06 zapata Exp $ + * @version $Id: Mir.java,v 1.43 2003/04/12 15:29:43 zapata Exp $ * */ public class Mir extends AbstractServlet { @@ -190,9 +190,12 @@ public class Mir extends AbstractServlet { //FIXME: this seems kind of hackish and only here because we can have // default other than the one that the browser is set to. Locale locale = new Locale(getDefaultLanguage(aRequest), ""); - MessageResources messageResources = - MessageResources.getMessageResources("bundles.admin"); - String htmlcharset = messageResources.getMessage(locale, "htmlcharset"); + String htmlcharset = "UTF-8"; + try { + htmlcharset = MirPropertiesConfiguration.instance().getString("Mir.DefaultHTMLCharset"); + } + catch (Throwable t) { + } aResponse.setContentType("text/html; charset=" + htmlcharset); diff --git a/source/default.properties b/source/default.properties index 38bdddf3..6e172d7c 100755 --- a/source/default.properties +++ b/source/default.properties @@ -270,6 +270,12 @@ Adaptor.PostgreSQL.Driver=org.postgresql.Driver # also used for the HTML charset meta tag. Mir.DefaultEncoding=UTF8 +# this encoding is used for the HTML charset meta tag. +# it must be the html charset equivalent of the Java encoding above +# don't change this unless... +Mir.DefaultHTMLCharset=UTF-8 + + #