Thread: Degrade(character conversion problem) pga3?

Degrade(character conversion problem) pga3?

From
"Hiroshi Saito"
Date:
Hi Andreas.

I have a problem.
It is a happening within this week.

See below.
http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20030922_1.jpg
http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20031007_1.jpg

Tonight, let me know it if you know something though it will be examined.
Thank you.

regards,
Hiroshi Saito

Re: Degrade(character conversion problem) pga3?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>I have a problem.
>It is a happening within this week.
>
>See below.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20030922_1.jpg
>http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20031007_1.jpg
>
>Tonight, let me know it if you know something though it will be examined.
>Thank you.
>

There's obviously something wrong... How about the error log?

Regards,
Andreas


Re: Degrade(character conversion problem) pga3?

From
"Hiroshi Saito"
Date:
Hi Andreas.

It is a little strange...

pgSet *pgConn::ExecuteSet(const wxString& sql)
{
    // Execute the query and get the status.
    PGresult *qryRes;
    wxLogSql(wxT("Set query (%s:%d): %s"), this->GetHost().c_str(), this->GetPort(), sql.c_str());
    qryRes = PQexec(conn, sql.mb_str(wxConvUTF8));

When this conv is made wxConvUTF8, a problem doesn't come out.
<why??>
It is ignored though this connection thread has already been set up.
Does it know anything though it tries to go on?
Logging  is sent by separate mail.

regards,
Hiroshi Saito

From: "Andreas Pflug" <pgadmin@pse-consulting.de>
> Hiroshi Saito wrote:
>
> >Hi Andreas.
> >
> >I have a problem.
> >It is a happening within this week.
> >
> >See below.
> >http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20030922_1.jpg
> >http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20031007_1.jpg
> >
> >Tonight, let me know it if you know something though it will be examined.
> >Thank you.
> >
>
> There's obviously something wrong... How about the error log?


Re: Degrade(character conversion problem) pga3?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>I have a problem.
>It is a happening within this week.
>
>See below.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20030922_1.jpg
>http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20031007_1.jpg
>
>Tonight, let me know it if you know something though it will be examined.
>Thank you.
>
>
>

Hi Hiroshi,

AFAICS this is a backend problem. I re-posted this on pgsql-bugs too,
the attached log is your's, reduced to the relevant part. Please check
the query in the Query Tool, try to modify the column name which seems
to provoke this problem.
Maybe you found a bug in the EUC_JP <-> UTF-8 conversion.

Regards,
Andreas

2003-10-09 01:25:27 QUERY  : Set query (128.77.50.202:5432): SELECT null_frac AS "Null Fraction", avg_width AS "Average
Width",n_distinct AS "Distinct Values", most_common_vals AS "Most Common Values", most_common_freqs AS "Most Common
Frequencies",histogram_bounds AS "Histogram Bounds", correlation AS "Correlation" 
  FROM pg_stats
 WHERE schemaname = 'public'
   AND tablename = 'stimsdb'
   AND attname = '要素識別番'
2003-10-09 01:25:27 QUERY  : WARNING:  UtfToLocal: could not convert UTF-8 (0xca94). Ignored
2003-10-09 01:25:27 QUERY  : WARNING:  UtfToLocal: could not convert UTF-8 (0xd427). Ignored
2003-10-09 01:25:27 QUERY  : WARNING:  LocalToUtf: could not convert (0x9776) EUC_JP to UTF-8. Ignored
2003-10-09 01:25:27 QUERY  : WARNING:  LocalToUtf: could not convert (0x9166) EUC_JP to UTF-8. Ignored
2003-10-09 01:25:27 QUERY  : WARNING:  LocalToUtf: could not convert (0x9522) EUC_JP to UTF-8. Ignored
2003-10-09 01:25:27 ERROR  : ERROR:  parser: unterminated quoted string at or near "'・ッ at character 351



Re: [BUGS] Degrade(character conversion problem) pga3?

From
"Hiroshi Saito"
Date:
Hi Andreas.

Hmm..
It is thought still to be bug on this side.
Or, wxWindows.
When the code is analyzed, it seems to be the below.

With the SJIS
9776 9166 8eaf 95ca 94d4

With the EUC_JP
d7cd  c7c1 b1bc ccca d6c8

With the UNICODE
feff 8981 7d20 8b58 5225 756a

When it is probably delivered, it fails the change.

regards,
Hiroshi Saito

----- Original Message -----
From: "Andreas Pflug" <pgadmin@pse-consulting.de>


> Hiroshi Saito wrote:
>
> >Hi Andreas.
> >
> >I have a problem.
> >It is a happening within this week.
> >
> >See below.
> >http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20030922_1.jpg
> >http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20031007_1.jpg
> >
> >Tonight, let me know it if you know something though it will be examined.
> >Thank you.
> >
> >
> >
>
> Hi Hiroshi,
>
> AFAICS this is a backend problem. I re-posted this on pgsql-bugs too,
> the attached log is your's, reduced to the relevant part. Please check
> the query in the Query Tool, try to modify the column name which seems
> to provoke this problem.
> Maybe you found a bug in the EUC_JP <-> UTF-8 conversion.
>
> Regards,
> Andreas
>


--------------------------------------------------------------------------------


>
> 2003-10-09 01:25:27 QUERY  : Set query (128.77.50.202:5432): SELECT null_frac AS "Null Fraction", avg_width AS
"Average
Width", n_distinct AS "Distinct Values", most_common_vals AS "Most Common Values", most_common_freqs AS "Most Common
Frequencies", histogram_bounds AS "Histogram Bounds", correlation AS "Correlation"
>   FROM pg_stats
>  WHERE schemaname = 'public'
>    AND tablename = 'stimsdb'
>    AND attname = 'è¦ç´ è­~å^¥ç.ª'
> 2003-10-09 01:25:27 QUERY  : WARNING:  UtfToLocal: could not convert UTF-8 (0xca94). Ignored
> 2003-10-09 01:25:27 QUERY  : WARNING:  UtfToLocal: could not convert UTF-8 (0xd427). Ignored
> 2003-10-09 01:25:27 QUERY  : WARNING:  LocalToUtf: could not convert (0x9776) EUC_JP to UTF-8. Ignored
> 2003-10-09 01:25:27 QUERY  : WARNING:  LocalToUtf: could not convert (0x9166) EUC_JP to UTF-8. Ignored
> 2003-10-09 01:25:27 QUERY  : WARNING:  LocalToUtf: could not convert (0x9522) EUC_JP to UTF-8. Ignored
> 2003-10-09 01:25:27 ERROR  : ERROR:  parser: unterminated quoted string at or near "'ãf»ï½¯ at character 351
>


Re: [BUGS] Degrade(character conversion problem) pga3?

From
"Hiroshi Saito"
Date:
Hi Andreas.

It was ascertained.
The timing of constructer of pgConn isn't suitable for it.
It tried to trace it in let's as below.
----------------------------------------------------
pgSet *pgConn::ExecuteSet(const wxString& sql)
{
    // Execute the query and get the status.
    PGresult *qryRes;
    wxLogSql(wxT("Set query (%s:%d): %s"), this->GetHost().c_str(), this->GetPort(), sql.c_str());
 if (&conv == &wxConvUTF8)
  wxLogSql(wxT("DEBUG: conv=>wxConvUTF8"));
 else
  if (&conv == &wxConvLibc)
   wxLogSql(wxT("DEBUG: conv=>wxConvLibc"));
  else
   wxLogSql(wxT("DEBUG: conv=>others"));

  qryRes = PQexec(conn, sql.mb_str(conv));
-------------------------------------------------------
All results are "DEBUG: conv=>wxConvLibc".
I think how it will be modified.....

any comment?

regards,
Hiroshi Saito

----- Original Message -----
From: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>


> Hi Andreas.
>
> Hmm..
> It is thought still to be bug on this side.
> Or, wxWindows.
> When the code is analyzed, it seems to be the below.


Re: [BUGS] Degrade(character conversion problem)

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>It was ascertained.
>The timing of constructer of pgConn isn't suitable for it.
>It tried to trace it in let's as below.
>----------------------------------------------------
>pgSet *pgConn::ExecuteSet(const wxString& sql)
>{
>    // Execute the query and get the status.
>    PGresult *qryRes;
>    wxLogSql(wxT("Set query (%s:%d): %s"), this->GetHost().c_str(), this->GetPort(), sql.c_str());
> if (&conv == &wxConvUTF8)
>  wxLogSql(wxT("DEBUG: conv=>wxConvUTF8"));
> else
>  if (&conv == &wxConvLibc)
>   wxLogSql(wxT("DEBUG: conv=>wxConvLibc"));
>  else
>   wxLogSql(wxT("DEBUG: conv=>others"));
>
>  qryRes = PQexec(conn, sql.mb_str(conv));
>-------------------------------------------------------
>All results are "DEBUG: conv=>wxConvLibc".
>I think how it will be modified.....
>
>

In the constructor of pgConn (line 152ff), the server encoding is
checked, and the client encoding is set to UNICODE if the server doesn't
use SQL_ASCII. If everything's successful, you should see a "Setting
client_encoding to 'UNICODE'.
I lost your log, and you didn't post it on pgadmin-hackers, so I can't
check myself.

Regards,
Andreas



Re: [BUGS] Degrade(character conversion problem)

From
"Hiroshi Saito"
Date:
Hi Andreas.

> >All results are "DEBUG: conv=>wxConvLibc".
> >I think how it will be modified.....
> >
> >
>
> In the constructor of pgConn (line 152ff), the server encoding is
> checked, and the client encoding is set to UNICODE if the server doesn't
> use SQL_ASCII. If everything's successful, you should see a "Setting
> client_encoding to 'UNICODE'.
> I lost your log, and you didn't post it on pgadmin-hackers, so I can't
> check myself.

It is understood.
However,
Succession doesn't go for wxConvUTF8 well in the temporally address.?
Let me follow it a little more.
Wait for a while...
Thank you.

regards,
Hiroshi Saito

Re: [BUGS] Degrade(character conversion problem)

From
"Hiroshi Saito"
Date:
Hi Andreas.

It was confirmed in this.
Please check and apply it.:-)

regards,
Hiroshi Saito


From: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
(snip)
> Let me follow it a little more.
> Wait for a while...
> Thank you.

Attachment

Re: [BUGS] Degrade(character conversion problem)

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>It was confirmed in this.
>Please check and apply it.:-)
>
>
Hi Hiroshi,

I don't like this patch. While looking at it, it will do the same as
before, just more complicated (and not complete).

What's wrong with the current version? What's happening in line 158 on
your system? Is it skipped or does the assignment fail? Which compiler
are you using?

Regards,
Andreas



Re: [BUGS] Degrade(character conversion problem)

From
"Hiroshi Saito"
Date:
Hi Andreas.

It is Windows2000+VC6(SP5).
However,
MB2WC of wxConvUTF8 is a virtual memory class,
and the problem of the multiplex succession happens in it.
Before constructor of the derivation class is called,
 it is called, and constructor of the basic class loses a goal.
Because you are smart, you move it with the head.
But, because I am not smart, I actually move it, and see it.:-(

regards,
Hiroshi Saito

----- Original Message -----
From: "Andreas Pflug" <pgadmin@pse-consulting.de>
To: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Cc: <pgadmin-hackers@postgresql.org>
Sent: Friday, October 10, 2003 11:53 PM
Subject: Re: [BUGS] [pgadmin-hackers] Degrade(character conversion problem)


> Hiroshi Saito wrote:
>
> >Hi Andreas.
> >
> >It was confirmed in this.
> >Please check and apply it.:-)
> >
> >
> Hi Hiroshi,
>
> I don't like this patch. While looking at it, it will do the same as
> before, just more complicated (and not complete).
>
> What's wrong with the current version? What's happening in line 158 on
> your system? Is it skipped or does the assignment fail? Which compiler
> are you using?
>
> Regards,
> Andreas
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org