This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 21936

Summary: I18N - The datasource description is not encoded as same as page encoding
Product: ide Reporter: issues@www <issues>
Component: CodeAssignee: Jan Chalupa <jchalupa>
Status: RESOLVED INVALID    
Severity: blocker Keywords: I18N
Priority: P2    
Version: -FFJ-   
Hardware: All   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:

Description issues@www 2002-03-27 19:39:09 UTC
Description: 
ForteESP_EA7, JDK 1.3.1, Tomcat 3.2.1

To reproduce:
    - Localize index.jsp in ForteESPServlet.war
    - Register datasource by editing sources.xml
      Set DESCRIPTION in Japanese
    - Connect ForteESP Admin (http://server:8080/ForteESPServlet/)

I've localized index.jsp with "euc-jp" Japanese encoding. I've also modified the
following line to display Japanese

<%@ page import="java.util.*" contentType="text/html; charset=euc-jp" %>

But datasource description is not displayed correctly. Normally, forte:expand
expands strings by following with page directive in jsp. I've verified it with
Restaurant Demo. But in this case, the DESCRIPTION is not expanded by euc-jp
which I've set in page directive as above.
The index.jsp uses SOURCEBEAN function to display the content of source.xml.
I've not tested SOURCEBEAN function for i18n testing. Could you give me any kind
of test programs to checking SOURCEBEAN with multibyte?

I've attached index.jsp, sources.xml and sumo.xml (sample datasource).

Evaluation: 
I think I have fixed this one. The problem was that while sources.xml was (and s
hould be) using the utf-8 charset, the ESP servlet was not reading it as utf-8. 
This causes no problems for latin characters, but would quickly corrupt any char
acters requiring true Unicode (such as Japanese).

I modified ForteESPServlet.java to use utf-8 whenever reading or writing the "so
urces.xml" registry file. I also found that I should (much as you did) add this 
line to all the admin tool JSPs:

<%@ page import="java.util.*" contentType="text/html; charset=utf-8" %>

You should still be able to change this to use "euc-jp" if you like. (Although i
t's not necessary if make your changes using utf-8; the JSPs should work correct
ly either way now.)


A comment.
Comment 1 Jan Chalupa 2002-11-01 16:10:28 UTC
A test issue. Changing to RESOLVED INVALID.
Comment 2 Jesse Glick 2002-12-23 16:36:11 UTC
Consistent use of the I18N keyword.