Re: ActionCache
Status: Inactive
Brought to you by:
fgnass
|
From: Felix G. <fel...@ne...> - 2004-06-24 14:42:00
|
Perry Prust wrote: > We have an application which is using UTF-8 encoded pages. When these > pages are stored in cache and are send to the browser from cache in > the next request - the page encoding is destroyed (when it comes to > non-ASCII characters - especially Chinese and Russian characters). > Is there some special setting which we have to use to force the cache > to always use UTF-8 encoding or ... > Hi Perry, in general actioncache should work with any encoding, no matter whether it's unicode or not. Anyway there are some places where your encoding could get screwed up: If response.getOutputStream() is called, the cached data is written to disk using a FileOutputStream byte by byte (assuming it's binary data). If on the other hand response.getWriter() is called, the cached data is written to disk using a FileWriter. Since no encoding is passed to the FileWriter, the default system encoding will be used. Please make sure <code>new FileWriter().getEncoding()</code> returns "UTF-8" and note that since JDK 1.4.2 the JVM doesn't honor the file.encoding system property anymore. Kind regards, Felix -- Felix Gnass Neteye GmbH - Agentur für interaktive Medien http://neteye.de |