Any suggestions for Maria? 
UTF-8 strings in fly over text work in IE, but we can't get them to work 
in Netscape.
Thanks,
Joe
---------------------- Forwarded by Joe Ross/Austin/IBM on 07/25/2001 04:25 PM 
---------------------------

To: 
cc: 
From:   Maria Baldassarri/Tivoli Systems@Tivoli Systems
Subject:        utf-8 and fly over (alt attribute in <img>tag ) )in netscape


Hi everybody,
I've built the following simple example to reproduce a problem that I've 
found with netscape.
 With the following jsp page,  without installing any gif it is possible 
to see that the same line of code
<br><img src="go.gif" alt="<%= utf8Str%>">
 produces two different behaviours:
The character shown is  correct in the page, but it is wrong in the fly 
over

The problem occur with nescape 4.7 on windows- nt 4.0
I've configured netscape in a japanese machine with the following 
variable/fixed width fonts:
unicode --> bitstream cyberbit
I've also chosen unicode (utf-8) character set.

The same example works fine in Internet Explorer.

Does anybody have a workaround for this problem?
thanks a lot Maria

p.s.
a) please respond directly to me because I'm not subscibed to this list 
b) where do I find in web an archive for this list?


fly.jsp file
----------------

<%
// 
**************************************************************************************************
 
-->
//  Server code                            -->
// 
**************************************************************************************************
 
-->
// *********************************************************** -->
//JSP Directive                                                -->
// *********************************************************** -->
%>
<%@ page language="java" %>
<% 
// ********************************* -->
//  JSP response, set utf8 encoding  -->
// ********************************* -->
    response.setContentType("text/html;charset=utf-8");
%>
<HTML>
<HEAD>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8">
</HEAD>
        <BODY>
<%
        //
        //string from byte array
        //
        byte[] bg = new byte[3];
        bg[0]  = (byte)0xe3;
        bg[1]  = (byte)0x81;
        bg[2]  = (byte)0x8a;
        String utf8Str  = new String(bg,0,3,"UTF8");
%> 
        this string has the following utf8 encoding:  e3 81 8a and the 
following mbcs encoding: 82 a8 <br> <%= utf8Str%>
        <br><img src="go.gif" alt="this works">
        <br><img src="go.gif" alt="<%= utf8Str%>">
        <script language="JavaScript">
                alert("this is letter O in japanese <%= utf8Str%>");
        </script>
</body> 
</html>

*************************************************************
 
Maria Baldassarri
Performance Area Development

Rome Tivoli Laboratory
Via Sciangai, 53
00144 - Rome (Italy)
Tel.: +39 (06) 59662701
E-Mail: [EMAIL PROTECTED]
Fax: +39 (06) 59662456









Reply via email to