X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 80FE15644B for ; Fri, 11 Mar 2005 01:20:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27000-03 for ; Fri, 11 Mar 2005 01:20:10 +0000 (GMT) Received: from web53706.mail.yahoo.com (web53706.mail.yahoo.com [206.190.37.27]) by svr1.postgresql.org (Postfix) with SMTP id 6D23C56423 for ; Fri, 11 Mar 2005 01:20:09 +0000 (GMT) Received: (qmail 61768 invoked by uid 60001); 11 Mar 2005 01:20:12 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=6LCoNgJgbA5d36Oqd4/vgzQNS2tohzBZQXZmPADFDEr3y/wQioc8qPdoBifdvGt6ye38/9mHO7hnm4WIXllm0t5c5vn+cfZugWgl/f9nh2jJ9plV5pqQEVbZmvDRJLZAjvghtkxQdytnAN4jNCel1wbtyaJLWgqcowxmo1BQfk4= ; Message-ID: <20050311012012.61766.qmail@web53706.mail.yahoo.com> Received: from [203.162.3.77] by web53706.mail.yahoo.com via HTTP; Thu, 10 Mar 2005 17:20:12 PST Date: Thu, 10 Mar 2005 17:20:12 -0800 (PST) From: star star Subject: Unicode! To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1822912279-1110504012=:55692" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.461 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200503/166 X-Sequence-Number: 16664 --0-1822912279-1110504012=:55692 Content-Type: text/plain; charset=us-ascii I use PostgreSQL 8! I have 2 file: insert.htm Untitled Document
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 " Tiếng Viá»#135;t ". Can you help me!? --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! --0-1822912279-1110504012=:55692 Content-Type: text/html; charset=us-ascii
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ếng Việt" on textfield and click Submit button. Insertion is successed.
But, when i view data in pgAdmin III(version 1.2.0), data is " Tiếng Việt ".
Can you help me!?


Do you Yahoo!?
Yahoo! Small Business - Try our new resources site! --0-1822912279-1110504012=:55692--