Bug 21936 - I18N - The datasource description is not encoded as same as page encoding
I18N - The datasource description is not encoded as same as page encoding
Status: RESOLVED INVALID
Product: ide
Classification: Unclassified
Component: Code
-FFJ-
All Windows ME/2000
: P2 (vote)
: TBD
Assigned To: Jan Chalupa
Jan Chalupa
: I18N
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-27 19:39 UTC by issues@www
Modified: 2005-03-09 04:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


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: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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo