Re: Unicode!

Поиск
Список
Период
Сортировка
От Chen Shaopeng
Тема Re: Unicode!
Дата
Msg-id 1110959524.2021.13.camel@cerberus.idsignet.com
обсуждение исходный текст
Ответ на Unicode!  (star star <hoatamet@yahoo.com>)
Список pgsql-admin
Since you used Java JDBC to insert the data into PostgreSQL,
can you also JDBC to pull it out back and see if you get
the right data back? If not, then your database encoding
is probably the error. You need to set the DB encoding
properly.

If you can get your data back to the correct encoding,
then check the environment settings of your pgadmin III.
I don't quite remember which version of pgadmin always
gave me that problem too when I used it in chinese
environment. My data in the DB is correct, and I can
get it back in the right encoding, but pgadmin just does
not display correctly, even though other applications
running in the same environment settings can display
unicode correctly.

Not sure if you are running Linux or Windows. If you run
Linux, you can set your environments to UTF-8, then connect
to the DB with psql, and display the contents of your data.
If your data are in unicode, you should see the display
correctly.

csp

在 2005-03-10四的 17:20 -0800,star star写道:
> 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 " Ting
> Vi‡t ".
> Can you help me!?
>

--
陈少鹏 Chen Shaopeng
上海龙方信息技术有限公司
http://www.idsignet.com

Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Milen A. Radev"
Дата:
Сообщение: Re: Too frequent warnings for wraparound failure
Следующее
От: Mitchell Laks
Дата:
Сообщение: Severe Badness On My Server: psql: FATAL: the database system is starting up