-
problem retrieving chinese characters in webpage
I have written a program to retrieve chinese characters from the database and display in the web page.If I change the encoding of the webpage manully it displays the chinese characters(比分卡片 ).
Or it shows the junk characters(±È·Ö¿¨Æ¬ ).Can anybody help me so that do I have to do any encoding or any other settings?.I am using Jdeveloper.
<HTML><HEAD><TITLE>Welcome to METRO</TITLE>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<%//@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="java.io.*,java.io.InputStream,java.nio.*,java.lang.*,java.util.*,javax.naming.Cont ext,java.sql.Connection,javax.sql.DataSource,javax.naming.InitialContext,java.sql.*" %>
</HEAD>
<BODY >
<%
String value="";
try{
Connection dbConn;
Statement stmt=null;
Context jndiCtx=new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource)jndiCtx.lookup( "jdbc/webdbPooledDS" );
dbConn= ds.getConnection();
stmt=dbConn.createStatement();
String sql="select prog_name_LL2 from wb_prog_new_metro where table_name='SCORE_CARD'";
ResultSet rs = stmt.executeQuery(sql);
if( rs.next()){
value=rs.getString(1);
out.println(value);
}
}catch(Exception e){
System.out.println("Exception ="+e.getMessage());
}
%>
</BODY></HTML>
Similar Threads
-
Replies: 0
Last Post: 10-30-2002, 04:39 AM
-
By ip266 in forum ASP.NET
Replies: 0
Last Post: 10-11-2002, 05:42 AM
-
Replies: 0
Last Post: 12-13-2001, 12:06 PM
-
Replies: 3
Last Post: 06-20-2001, 03:53 PM
-
Replies: 0
Last Post: 06-20-2001, 01:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks