Unicode!

From: star star <hoatamet(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Unicode!
Date: 2005-03-11 01:20:12
Message-ID: 20050311012012.61766.qmail@web53706.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I use PostgreSQL 8!

I have 2 file:

insert.htm
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form name="form1" method="post" action="postgre_insert.jsp" >
<input type="text" name="username">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>

postgre_insert.jsp
<%@ page contentType="text/html; charset=utf-8" import="java.sql.*" errorPage="" %>
<%
String username=request.getParameter("username");
String str="insert into user_table values('"+username+"','try')";
Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://localhost:5432/try";
Connection conn = DriverManager.getConnection(url, "postgres", "pass");
PreparedStatement s = conn.prepareStatement(str);
s.executeUpdate();
out.println("OK");
%>
I input "Ti#7871;ng Vi#7879;t" on textfield and click Submit button. Insertion is successed.
But, when i view data in pgAdmin III(version 1.2.0), data is " Ting Vi#135;t ".
Can you help me!?


---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alex Turner 2005-03-11 02:19:19 Re: IO Timeout
Previous Message Tom Lane 2005-03-11 00:10:29 Re: Functions and transactions