Dear Sirs:

I am Yoshihiro KANNA, developing a Japanese web application with
some other developers.
We have been developing Japanese web application on Jetspeed-1.2b1,
but we met a problem that Jetspeed can't handle some Japanese characters.
So we made a patch to solve this problem. I hope this can help you
improve Jetspeed in the next release.

Here is a patch to Jetspeed-1.2b1:

--- Jetspeed-1.2b1-org/src/java/org/apache/jetspeed/portal/factory/PortletFactory.java 
 Thu Jun 15 09:38:16 2000
+++ Jetspeed-1.2b1/src/java/org/apache/jetspeed/portal/factory/PortletFactory.java     
+ Mon Aug 28 13:33:36 2000
@@ -290,8 +290,17 @@
             String url = pde.getURL();
             this.lastmodified = pde.getFile().lastModified();
 
-            portlets = Portlets.unmarshal(
-                new InputStreamReader( new URL( url ).openStream() ) );
+            String encoding = 
+JetspeedResources.getInstance().getString("psml.encoding");
+            if( encoding == null ) {
+                Log.note( "PortletFactory : encoding -> (default)" );
+                portlets = Portlets.unmarshal(
+                    new InputStreamReader( new URL( url ).openStream()) );
+            }
+            else {
+                Log.note( "PortletFactory : encoding -> " + encoding );
+                portlets = Portlets.unmarshal(
+                    new InputStreamReader( new URL( url ).openStream(), encoding ) );
+            }
 
             this.portlets = portlets;
 
--- 
Jetspeed-1.2b1-org/src/java/org/apache/jetspeed/portal/factory/PortletRegistry.java 
Thu Jun 15 09:38:16 2000
+++ Jetspeed-1.2b1/src/java/org/apache/jetspeed/portal/factory/PortletRegistry.java    
+ Mon Aug 28 13:33:36 2000
@@ -333,9 +333,18 @@
             String url = pde.getURL();
             this.lastmodified = pde.getFile().lastModified();
 
-            org.apache.jetspeed.xml.api.registrymarkup.Registry reg = 
-                org.apache.jetspeed.xml.api.registrymarkup.Registry.unmarshal(
-                    new InputStreamReader( new URL( url ).openStream() ) );
+            String encoding = 
+JetspeedResources.getInstance().getString("psml.encoding", null);
+            org.apache.jetspeed.xml.api.registrymarkup.Registry reg;
+            if( encoding == null ) {
+                Log.note( "PortletRegistry:  encoding -> (default)" );
+                reg = org.apache.jetspeed.xml.api.registrymarkup.Registry.unmarshal(
+                        new InputStreamReader( new URL( url ).openStream() ) );
+            }
+            else {
+                Log.note( "PortletRegistry:  encoding -> " + encoding );
+                reg = org.apache.jetspeed.xml.api.registrymarkup.Registry.unmarshal(
+                        new InputStreamReader( new URL( url ).openStream(), encoding 
+) );
+            }
 
             org.apache.jetspeed.xml.api.registrymarkup.Entry[] entries = 
reg.getPortlets().getEntry();
 

Best Regards,

---
Yoshihiro KANNA
[EMAIL PROTECTED]


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to