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 21933 - I18N - The datasource description is not encoded as same as page encoding
Summary: I18N - The datasource description is not encoded as same as page encoding
Status: RESOLVED INVALID
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All Windows ME/2000
: P2 blocker (vote)
Assignee: Jan Chalupa
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2002-03-27 19:35 UTC by issues@www
Modified: 2005-03-09 04:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description issues@www 2002-03-27 19:35:11 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 Ken Frank 2002-05-15 16:57:21 UTC
Can I close this one and 21936 since they show up
in queries for i18n and sometimes folks think its 
a real issue, but I think it may not be since in dummy
category ?

Thanks - Ken
ken.frank@sun.com
04/15/2002
Comment 2 Marek Grummich 2002-07-19 08:52:58 UTC
Set target milestone -  S1S 4.1
Comment 3 Jan Chalupa 2002-11-01 16:10:19 UTC
A test issue. Changing to RESOLVED INVALID.
Comment 4 Jesse Glick 2002-12-23 16:36:06 UTC
Consistent use of the I18N keyword.