Russell,

        This comes from the SilverStream admin guide on page 90.  It tells
you how to change it in the httpd.props file, but you might be able to get
it to work via the web.xml.

____________________________________________________________________________
_____
Specifying character set encoding


The SilverStream server uses the following server property when URL-encoding
and -decoding form content:

http-server.com.sssw.srv.international.UrlEncoding

NOTE SilverStream stores the encoding and other server startup properties in
the httpd.props configuration file, which is located in the
SilverStreamInstallDir\resources directory. For more information, see
Appendix A, "The httpd.props File". By default, the SilverStream server uses
utf-8 (Universal Character Set Transfer Format) for URL encoding and
decoding. Because utf-8 can encode ASCII characters without requiring
modification, utf-8 works well for English and most western languages.
Because languages
using multibyte encodings are not a subset of utf-8, character encoding and
decoding will not work properly with them.

When to change the encoding scheme You typically need to change the encoding
scheme only when the majority of client browsers in your environment use
character encodings that are not ISO 8859-1 (Latin 1). For example, a
Japanese Web site that serves content to its employees using the ShiftJIS
encoding may want to change its SilverStream server's encoding property to
SJIS.

To change the encoding scheme:

1. To change from the default utf-8 to another encoding, add the following
line to the httpd.props file (located in the resources directory beneath the
SilverStream root directory):

http-server.com.sssw.srv.international.UrlEncoding= NewEncoding

2. Enter the language mapping needed at your site in place of the
NewEncoding variable.
Check the Sun Web site if you are unsure about the Java string mapping for
your
language.

3. Restart the SilverStream server.

URL content will be encoded using the new encoding scheme after you restart
the server.


Jeff Krueger


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: Silverstream, struts and UTF-8 Encoding


I am having some problems with a struts based application in that the
browser does not seem to change to UTF-8 encoding and as a result, i am
losing some characters. I have read quite a few postings regarding i18n
including this excerpt:

1) Specify the content type for the JSP output:

    <%@ page contentType="text/html; charset=utf-8" %>

You can also do this by setting the content type header manually, using
response.setContentType().

2) Specify the content type to the browser:

    <meta http-equiv="content-type" content="text/html; charset=utf-8">

3) Specify the default content type to the container. In our case, we are
using Resin, and so do this:

    <web-app id='/' character-encoding='utf-8' ... >


I have changed the jsp for the first 2 but the browser still doesn't
recognise that it is meant to be UTF-8. Has anyone any experience of this
or know how to resolve it? I have been unable to do the last step in the
web xml as i dont know what the context-param name would be for
silverstream - does anyone know?
I think the web.xml should look something like:
<web-app>
        <!-- configure input charset to be utf-8 -->
        <context-param>
                <param-name>weblogic.httpd.inputCharset./*</param-name>
                <param-value>UTF-8</param-value>
        </context-param>
...
</web-app>

but with a different param-name.

Any clues as to why UTF-8 isn't working would be appreciated.

Russell


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to