[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.2

Display of japanese characters in a web based application

Asked by Prasanna_Hebbar in Java Programming Language, Font Creator

Tags: shift_jis, characters, file, japanese

Hi,

We have a japanese database which stores the characters in Shift-JIS format. Then I use JDBC API to extract the information from the database and then dump it into a html. When I visit this dynamic page, the html contains some strange characters, but not the japanese character.

I could view different japanese pages properly. When I run "SELECT dump( column2,16 ) FROM MYTABLE WHERE column1='3001';", I get "Typ=1 Len=7: c4,d7,cc,de,d9,2f,46".

I don't think the problem is in displaying the characters. I believe the problem is when extracting the characters using JDBC. Can someone suggest what to do?

Thanks,
Prasanna


This is the jsp file we have......
######################################
<%@ page import="java.io.*,java.util.*,java.sql.*,java.net.*, java.sql.*,java.text.*" errorPage="error.jsp" %>


<html>
<title>QUEUE</title>

<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<meta http-equiv="content-Language" content="ja">
<meta http-equiv="refresh" content="900">
</head>


<body>
<div align=center>
<table border=10 width=100%">
<tr bgcolor="#3399FF"><td align=center>
<font face=Arial color="#ffffff" size=2><b>Queue</b></font>
</tr>
</table>

<%
String column1="";
String column2 = "";
String column3 = "";
String column4 = "";
String column5 = "";
%>


<table border=10 width=100% cellspacing=0>
<tr>
          <td align=center valign=bottom bgcolor = #FF9900><B> Column1 </B></td>
         <td align=center valign=bottom bgcolor = #FF9900><B> Column2 </B></td>
         <td align=center valign=bottom bgcolor = #FF9900><B> Column3 </B></td>
         <td align=center valign=bottom bgcolor = #FF9900><B> Column4 </B></td>
         <td align=center valign=bottom bgcolor = #FF9900><B> Column5 </B></td>
</tr>

<%
    Connection conn = null;
    try{
         Class.forName("oracle.jdbc.driver.OracleDriver");
         String connectString = "jdbc:oracle:thin:@xx.xx.xx.xx:INDBD9";
         conn = DriverManager.getConnection(connectString,"USERID","PASSWORD");
         Statement stmt = null;
         ResultSet rset = null;
         
         String sqlquery = "SELECT column1, column2, column3, column4, column5 " +
              "FROM MYTABLE WHERE column1 = '3001'";

         stmt = conn.createStatement();
         rset = stmt.executeQuery(sqlquery);
         
         while(rset.next()) {
              column1 = new String(rset.getBytes(1), "SJIS");
              column2 = new String(rset.getBytes(2), "SJIS");
              column3 = new String(rset.getBytes(3), "SJIS");
              column4 = new String(rset.getBytes(4), "SJIS");
              column5 = new String(rset.getBytes(5), "SJIS");
%>
         <tr>
          <td align=center valign=bottom bgcolor = #FFFFCC> <%= column1 %></td>

         <td align=center valign=bottom bgcolor = #FFFFCC> <%= column2 %></td>

         <td align=center valign=bottom bgcolor = #FFFFCC> <%= column3 %></td>

         <td align=center valign=bottom bgcolor = #FFFFCC> <%= column4 %></td>

         <td align=center valign=bottom bgcolor = #FFFFCC> <%= column5 %></td>

         </tr>
   
<%
         rset.close();
         stmt.close();
         conn.close();
}catch(Exception e) {

    e.printStackTrace();

}    
%>
</table>

</body>
</html>
####################################
[+][-]07/29/03 10:40 PM, ID: 9033851Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Java Programming Language, Font Creator
Tags: shift_jis, characters, file, japanese
Sign Up Now!
Solution Provided By: kokchoon78
Participating Experts: 3
Solution Grade: C
 
[+][-]07/28/03 11:09 PM, ID: 9025511Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/28/03 11:39 PM, ID: 9025665Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/28/03 11:53 PM, ID: 9025753Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/28/03 11:59 PM, ID: 9025781Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/29/03 12:21 AM, ID: 9025885Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/03 12:22 AM, ID: 9025895Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/03 12:32 AM, ID: 9025937Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/03 01:46 AM, ID: 9026308Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/29/03 04:31 AM, ID: 9027043Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/03 04:51 AM, ID: 9027148Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/03 05:43 AM, ID: 9027465Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/03 09:14 PM, ID: 9033577Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/29/03 10:09 PM, ID: 9033754Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/29/03 10:23 PM, ID: 9033797Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/30/03 04:27 AM, ID: 9035376Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/30/03 04:31 AM, ID: 9035403Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/30/03 04:52 AM, ID: 9035488Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/30/03 06:04 AM, ID: 9035937Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/30/03 06:07 AM, ID: 9035952Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/10/03 01:16 AM, ID: 9910764Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93