Hi everybody  again!

I have found the solution for my problem and want to share my experience with 
Tomcat Users List because it may be useful for somebody else

The point is that the default encoding behaviour of request object in 
ApacheJServ case provided a right recognition for characters transfered 
within request, but default behaviour has a tendency to change sometimes and 
for this case W3C has foreseen the atribute accept-charset for element/tag 
form

So to be short it should be in Tomcat case

<form action="action.jsp" method="POST" accept-charset="ISO-8859-5">
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
...........

</form>

instead of simple 

<form action="action.jsp" method="POST">

to provide a right processing of characters different from latin, in my case 
cyrrilic.
accept-charset should be ISO even if I have KOI8-R or Windows 1251 encoding 
for page itself

Hope it will be useful for you and if you have other ideas or better 
explanation for this issue they are greatly appreciated

With best regards,
ilis



On Saturday 13 July 2002 18:46, you wrote:
> Hi everybody,
>
> I have just a simple problem with characters which are different from latin
> symbols, for examlple I have cyrrilic. May be it seems to be not a subject
> for Tomcat Users List, but I decided to ask here because I did not have
> this problem before working with ApacheJServ and I experience this problem
> with Tomcat, first version 3.2.3 and now after upgrading with 4.0.4.
> Obviously this is the issue of tomcat itself and not simply java if I am
> not mistaken.
>
> The problems arise when I get data from request object. Such interfaces as
> ServletRequest and ServletHttpRequest are realized by server software and
> particularly in classes and libraries provided by tomcat distribution
>
> So I have data which are sent to the server from the form with POST method
> and these data are simple cyrrilic text. Then in the jsp page that has to
> treat these data I get these data from request object and am supposed to
> make with them some extra operations.
>
>      In my jsp code I have lines:
>
> name = request.getParameter("name");
> description = request.getParameter("description");
> brief = request.getParameter("brief");
> out.println("<P>brief1: "+brief);
> brief =  "���������� ������� ����������";
> out.println("<P>brief2: "+brief);
> out.println("<P>description: "+description);
> out.println("<P>name: "+name);
>
>
>      these lines in the case of Apache with ApacheJServ configuration
> produce next lines in browser:
>
> brief1: ���������� ������� ����������
> brief2: ���������� ������� ����������
> description: �������� ����������
> name: ��������
>
>
>      and in tomcat case they are below:
>
> brief1: ?????????? ??????? ??????????
> brief2: ���������� ������� ����������
> description: ?????????? ??????? ??????????
> name: ?????????? ??????? ??????????
>
> In first case (ApacheJServ configuration) everything is OK, in tomcat case
> complete senselessness
>
> In the top of each my jsp page I have a directive
>
> <%@ page contentType="text/html;charset=Windows-1251" %>
>
> so usually all other occurences of cyrrilic text which are not related with
> request object are shown properly
>
> I hope my english is understandable and you can get this issue
>
> Thanks,
> ilis

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

Reply via email to