You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Ishikawa Katsuya <ka...@hotmail.com> on 2002/02/09 10:36:39 UTC

Japanese characters in HelloWorldPortlet

Hi to all:
I've just started playing with Jetspeed (1.3a2 on Tomcat3.3a).  
Installation was quick and simple, and I enjoy it on my Win2000.

Now my question is how I can show Japanese characters on my 
HelloWorldPortlet.  I took an example and simply replaced "Hello World!" 
with Japanese hello which is shown as ????? on the screen.  Five ?'s when 
five doube-byte characters, two ?'s when two characters, and ...  So one 
double-byte character is replaced with one single byte ?.  This is not 
something you see when the browser encoding is set wrong.  From this 
symptom, I guess Jetspeed itself or something in between generates ?'s.  I 
see no errors in the log either.

When I use WebPagePortlet to connect to outside Japanese homepages, 
characters are shown just fine.

Anybody have any clue ?  Do I have to do anything more than replacing the 
words ?

Here is the code chunk that I use:
    public class HelloWorldPortlet extends AbstractPortlet
    {
        public ConcreteElement getContent (RunData runData)
        {
            return (new StringElement ("C1C2C3C4C5"));
        }
    }
where Cn is a double-byte character.

Here is the xreg file.
        <portlet-entry name="MyHelloWorld" hidden="false" type="instance" 
application="false">
            <meta-info>
                <title>Hello in Japanese</title>
                <description>Hello World - Japanese</description>
            </meta-info>
            <media-type ref="html"/>
        </portlet-entry>

The same code works fine with English "Hello".

--k


_________________________________________________________________
メールだけじゃなかった!インターネット便利サービスがひとまとまり 
http://explorer.msn.co.jp/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>