From a6b45deaa888ba6812d742b7a3a80d6a26d245d8 Mon Sep 17 00:00:00 2001 From: hns Date: Sun, 20 May 2001 13:10:48 +0000 Subject: [PATCH] implemented settable character sets --- src/helma/framework/core/Application.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index 03028aa5..73204284 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -77,6 +77,8 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn protected CacheMap skincache = new CacheMap (100); + String charset; + private CryptFile pwfile; @@ -126,6 +128,8 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn nmgr = new NodeManager (this, dbDir.getAbsolutePath (), props); + charset = props.getProperty ("charset", "ISO-8859-1"); + debug = "true".equalsIgnoreCase (props.getProperty ("debug")); try { requestTimeout = Long.parseLong (props.getProperty ("requestTimeout", "60"))*1000l; @@ -297,7 +301,12 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn if (primaryRequest) { activeRequests.remove (req); releaseEvaluator (ev); - res.close (); // this needs to be done before sending it back + // response needs to be closed/encoded before sending it back + try { + res.close (charset); + } catch (UnsupportedEncodingException uee) { + logEvent ("Unsupported response encoding: "+uee.getMessage()); + } } else { res.waitForClose (); }