|
||
|
|||
|
Hi...
I am working on project related to localization.I want to add marathi text to mysql table.But when i add it through jsp page it shows garbage values.Can u suggest any solution to this problem. Thank you.
Last edited by vaishali; 12-11-2008 at 06:48 AM. |
|
||||
|
Hello vaishali.
Welcome to the Java Programming Forums. Can you please post the code that you have written. It will be near impossible to diagnose your problem without it.. Thanks.
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
|
|||
|
Hi...
Thanks for reply.Actually i am using java,mysql database with netbeans 6.1.Whenever i try to add through command editor it will add values correctly.But whenever i add it through program it will shows '??' marks instead of values. Below i am pasting the code which i had used. Java code to insert values.I have used jsp page for that. Java Code
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*,java.util.Enumeration" import="java.sql.Connection" %>
<html>
<head>
<title>Test</title>
</head>
<body>
<%
String url="jdbc:mysql://localhost:3306/MyNewDatabase";
Connection con = null;
Statement stmt;
ResultSet rs = null;
String query,query1;
PreparedStatement stmt1;
try{
try{
Class.forName("com.mysql.jdbc.Driver");
}
catch(Exception e)
{
out.println("driver_not_found"+e.getMessage());
}
con = DriverManager.getConnection (url,"root","mysql123");
int id1=1115;
String word1="आई";
String pos1="noun";
stmt1=con.prepareStatement("insert into htb_all_words1 values('"+id1 +"','"+word1+"','"+pos1+"')");
stmt1.executeUpdate();
stmt = con.createStatement();
query = "select * from htb_all_words1 ";
ResultSet result = stmt.executeQuery(query);
while(result.next())
{
String id= result.getString(1);
String word2=result.getString(2);
String pos2=result.getString(3);
%>
<br><% out.println(id);%>
<% out.println(word2);%>
<% out.println(pos2);%>
<%
}
}
catch(Exception e)
{
out.println("SQLException_caught:_" + e.getMessage());
}
finally {
try {
if (con != null) con.close();
}
catch (SQLException e) {}
}
%>
<br>
Second JSP page...................
</body>
</html>
Java Code
!-- Document : keyboard Created on : Sep 16, 2008, 10:24:59 PM Author : staff --> 1 धन verb 2 पुण verb 3 पुण verb 10 पुण verb 11 ?? noun 99 शोध noun 100 पुण verb 111 905 noun 112 u0905 noun 113 905 noun 114 905 noun 115 u0905 noun 116 \u0905 noun 1000 ?? verb 1001 पुण noun 1002 †œ noun 1003 †œ noun 1004 धन verb 1111 ?? noun 1113 ?? noun 1114 आई noun 1115 ?? noun Second JSP page................... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dynamic table creation | jam123 | JavaServer Pages: JSP & JSTL | 2 | 08-07-2009 11:35 AM |
| Getting table height | jsnx7 | JavaServer Pages: JSP & JSTL | 1 | 19-03-2009 04:03 PM |
| MySQL+Java+Unicode | Desert Fox | JDBC & Databases | 2 | 12-11-2008 12:29 PM |
|
100 most searched terms
Search Cloud
|
| 2d arraylist java actionlistener actionlistener in java actionlistener java addactionlistener addactionlistener in java addactionlistener java applications of oops could not create java virtual machine xp double format java double to int java double to integer in java double to integer java eclipse shortcut keys eclipse tutorial for beginners exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double java get mouse position java http://www.javaprogrammingforums.com/object-oriented-programming/3713-limiting-decimal-places-double.html java 2d arraylist java actionlistener java addactionlistener java double format java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programmers forum java programming forum java programming forums java programming help java project ideas java sendkeys java two dimensional arraylist java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton actionlistener jtextarea font jtextarea font color jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream two dimensional arraylist java writing ipod apps |