shinsuke 2005/03/01 14:19:54
Modified: components/web-content/src/java/org/apache/jetspeed/portlet
WebContentPortlet.java
Log:
fixed JS2-218
http://issues.apache.org/jira/browse/JS2-218
Revision Changes Path
1.12 +6 -5
jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/WebContentPortlet.java
Index: WebContentPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/WebContentPortlet.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WebContentPortlet.java 12 Jan 2005 09:20:33 -0000 1.11
+++ WebContentPortlet.java 1 Mar 2005 22:19:54 -0000 1.12
@@ -107,7 +107,7 @@
public static final String CACHE = "webcontent.cache";
/** Default encoding */
- public String defaultEncoding = "iso-8859-1";
+ public String defaultEncoding = "UTF-8";
/* SSO settings */
boolean isSSOEnabled = false;
@@ -266,7 +266,7 @@
// drain the stream to the portlet window
ByteArrayInputStream bais = new ByteArrayInputStream(content);
- drain(bais, response.getPortletOutputStream());
+ drain(new InputStreamReader(bais, this.defaultEncoding),
response.getWriter());
bais.close();
// Done just save the last URL
@@ -508,7 +508,8 @@
GetMethod get = new GetMethod(uri);
int status = client.executeMethod(get);
InputStream is = get.getResponseBodyAsStream();
- return new InputStreamReader(is);
+ // TODO need to parse HTML meta tag to get charset info
+ return new InputStreamReader(is, get.getResponseCharSet());
}
catch (IOException e)
{
@@ -516,4 +517,4 @@
}
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]