Thread: ctlSQLBox ClientEncoding problem on Display?

ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas.

UNICODE standard seems to be a correct answer.!
I am examined with the standard so that it can operate it without problem.

ScreenShot of the reference is a UNICODE version.
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug1.jpg

The place of the problem can't be limited.
But, it seems to be WxWindows.

Teach if you understood it though it tries it again tonight.

Thank you in advance for your understanding.

With kindest regards,
Hiroshi-Saito


Re: ctlSQLBox ClientEncoding problem on Display?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>UNICODE standard seems to be a correct answer.!
>I am examined with the standard so that it can operate it without problem.
>
>ScreenShot of the reference is a UNICODE version.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug1.jpg
>
>
>
Hi Hiroshi,
that nasty bug that prevented unicode under gtk might as well be
responsible for this. Please either use wxWindows2.5 >= 2003-06-07 or
patch the file common/string.cpp in wxString::wxString(const char *psz,
wxMBConv& conv, size_t nLength) around line 269:


// MB2WC wants the buffer size, not the string length
if ( conv.MB2WC(m_pchData, psz, nLen + 1) != (size_t)-1 )
{
// initialized ok
m_pchData[nLen] = 0; // <<<< this was missing and left strings unterminated
return;
}

Regards,
Andreas



Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas.

Thank you for the Debug information.

----- Original Message -----
From: "Andreas Pflug" <Andreas.Pflug@web.de>
To: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Cc: <pgadmin-hackers@postgresql.org>
Sent: Thursday, June 12, 2003 4:54 PM
Subject: Re: [pgadmin-hackers] ctlSQLBox ClientEncoding problem on Display?


> Hiroshi Saito wrote:
>
> >Hi Andreas.
> >
> >UNICODE standard seems to be a correct answer.!
> >I am examined with the standard so that it can operate it without
problem.
> >
> >ScreenShot of the reference is a UNICODE version.
>
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug1.jpg
> >
> >
> >
> Hi Hiroshi,
> that nasty bug that prevented unicode under gtk might as well be
> responsible for this. Please either use wxWindows2.5 >= 2003-06-07 or
> patch the file common/string.cpp in wxString::wxString(const char *psz,
> wxMBConv& conv, size_t nLength) around line 269:
>
>
> // MB2WC wants the buffer size, not the string length
> if ( conv.MB2WC(m_pchData, psz, nLen + 1) != (size_t)-1 )
> {
> // initialized ok
> m_pchData[nLen] = 0; // <<<< this was missing and left strings
unterminated
> return;
> }

Hmm..
It was information on 6/8.
I see this place being treated with the information , too.

Index: common/string.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
retrieving revision 1.172
retrieving revision 1.173
diff -r1.172 -r1.173
7c7
< // RCS-ID:      $Id: string.cpp,v 1.172 2003/05/29 14:03:34 GD Exp $
---
> // RCS-ID:      $Id: string.cpp,v 1.173 2003/06/06 00:43:21 RD Exp $
269a270
>             m_pchData[nLen] = 0;

bug still lurks besides.
It is about to be seen from now.

Thank you for taking precious time.

With kindest regards,
Hiroshi-Saito




Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas.

I continue it, and try Debug to solve a problem.
But, it wasn't easy....

The place to cause a problem seems to be in something of
scintilla/src/Editor.cxx..
An indication position at the time of Wide-Character seems to be moved
double.

Is this the phenomenon which happens in Japanese only in Windows???

With kindest regards,
Hiroshi-Saito

> Hi Andreas.
>
> Thank you for the Debug information.
>
(snip)
> > Hiroshi Saito wrote:
> >
> > >Hi Andreas.
> > >
> > >UNICODE standard seems to be a correct answer.!
> > >I am examined with the standard so that it can operate it without
> problem.
> > >
> > >ScreenShot of the reference is a UNICODE version.
> >
>
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug1.jpg
> > >
> > >
> > >
> > Hi Hiroshi,
> > that nasty bug that prevented unicode under gtk might as well be
> > responsible for this. Please either use wxWindows2.5 >= 2003-06-07 or
> > patch the file common/string.cpp in wxString::wxString(const char *psz,
> > wxMBConv& conv, size_t nLength) around line 269:
> >
> >
> > // MB2WC wants the buffer size, not the string length
> > if ( conv.MB2WC(m_pchData, psz, nLen + 1) != (size_t)-1 )
> > {
> > // initialized ok
> > m_pchData[nLen] = 0; // <<<< this was missing and left strings
> unterminated
> > return;
> > }
>
> Hmm..
> It was information on 6/8.
> I see this place being treated with the information , too.
>
> Index: common/string.cpp
> ===================================================================
> RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
> retrieving revision 1.172
> retrieving revision 1.173
> diff -r1.172 -r1.173
> 7c7
> < // RCS-ID:      $Id: string.cpp,v 1.172 2003/05/29 14:03:34 GD Exp $
> ---
> > // RCS-ID:      $Id: string.cpp,v 1.173 2003/06/06 00:43:21 RD Exp $
> 269a270
> >             m_pchData[nLen] = 0;
>
> bug still lurks besides.
> It is about to be seen from now.
>
> Thank you for taking precious time.
>
> With kindest regards,
> Hiroshi-Saito
>


Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas.

Oh. Thank you very much.
Understanding is difficult if it is not you. !!

It may not be able to explain well.

ScreenShot of the reference is a UNICODE version.
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug1.jpg
Query-Window moves with the same routine.
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug2.jpg
Input is tried.
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug3.jpg

http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug4.jpg
Action after that is interesting.
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug5.jpg

Control is delivered from here.

----stc.cpp------
// Replace the contents of the document with the argument text.
void wxStyledTextCtrl::SetText(const wxString& text) {
    SendMsg(2181, 0, (long)(const char*)wx2stc(text));
}

----scintilla/include/Scintilla.h-----
#define SCI_GETOVERTYPE 2187

----scintilla/src/Editor.cxx--------
sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
        if (recordingMacro)
                NotifyMacroRecord(iMessage, wParam, lParam);

        switch (iMessage) {
        case SCI_GETOVERTYPE:
                return inOverstrike ? 1 : 0;

<><><><>(The starting point that this is a movement)
void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle,
LineLayout *ll, int width) {
<><><><>

I am very tired. (x_x)
You are to spend a good holiday, too.

With kindest regards,
Hiroshi-Saito

----- Original Message -----
From: "Andreas Pflug" <Andreas.Pflug@web.de>
To: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Sent: Saturday, June 14, 2003 4:22 AM
Subject: Re: [pgadmin-hackers] ctlSQLBox ClientEncoding problem on Display?


> Hiroshi Saito wrote:
>
> >Hi Andreas.
> >
> >I continue it, and try Debug to solve a problem.
> >But, it wasn't easy....
> >
> >The place to cause a problem seems to be in something of
> >scintilla/src/Editor.cxx..
> >An indication position at the time of Wide-Character seems to be moved
> >double.
> >
> >
> >
> Hiroshi,
>
> please tell me the position, maybe I can see something.
> Regards,
> Andreas
>


Re: ctlSQLBox ClientEncoding problem on Display?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>Oh. Thank you very much.
>Understanding is difficult if it is not you. !!
>
>It may not be able to explain well.
>
>ScreenShot of the reference is a UNICODE version.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug1.jpg
>Query-Window moves with the same routine.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug2.jpg
>Input is tried.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug3.jpg
>
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug4.jpg
>Action after that is interesting.
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug5.jpg
>
>Control is delivered from here.
>
>
>
Hiroshi,

please do the following:
- Store the definition of the table you are testing with to a file
- Send the definition to me, so that I can create it in my database.

Still, this looks just like a wxWindows version that doesn't have the
wxString patch applied. Please double check if you are using a corrected
version. Maybe you mixed up debug and nondebug version? Rebuilt
wxWindows release, but compiled pgAdmin3 debug thus effectively using
wxWindows debug with old code?


Regards,
Andreas



Re: ctlSQLBox ClientEncoding problem on Display?

From
Andreas Pflug
Date:
Andreas Pflug wrote:

>
>
> Still, this looks just like a wxWindows version that doesn't have the
> wxString patch applied. Please double check if you are using a
> corrected version. Maybe you mixed up debug and nondebug version?
> Rebuilt wxWindows release, but compiled pgAdmin3 debug thus
> effectively using wxWindows debug with old code?

Blame on me...
Hiroshi,
In case you used the win32 version from snake.pgadmin.org, which
originates from me, I have to admit that this version was linked to an
old wxWindows version containing that bug.... :-(
This is fixed on snake now.

Regards,
Andreas


Re: ctlSQLBox ClientEncoding problem on Display?

From
Hiroshi Saito
Date:
Hi Andreas
Thank you.

----- Original Message -----
From: "Andreas Pflug" <Andreas.Pflug@web.de>
To: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Cc: <pgadmin-hackers@postgresql.org>
Sent: Saturday, June 14, 2003 7:07 PM
Subject: Re: [pgadmin-hackers] ctlSQLBox ClientEncoding problem on Display?


(snip)
> Hiroshi,
>
> please do the following:
> - Store the definition of the table you are testing with to a file
> - Send the definition to me, so that I can create it in my database.
It mails by direct delivery independently.

>
> Still, this looks just like a wxWindows version that doesn't have the
> wxString patch applied. Please double check if you are using a corrected
> version. Maybe you mixed up debug and nondebug version? Rebuilt
> wxWindows release, but compiled pgAdmin3 debug thus effectively using
> wxWindows debug with old code?

1)WxWindows(cvs checkout 2003-06-12)
2) pgadmin3(cvs checkout 2003-06-12)
Since a link is divided with DEBUG and RELEASE and is performed, there is no
mixture.

I'm sorry.
Since a server cannot be accessed now, a situation cannot be told well.
A problem may be able to be seen also by the attached thing.
It is made to tell again on Monday in detail.

Regards,
Hiroshi Saito
(saito@inetrt.skcapi.co.jp)


Re: ctlSQLBox ClientEncoding problem on Display?

From
"Saito"
Date:
Hi Andreas
Thank you.

----- Original Message -----
From: "Andreas Pflug" <Andreas.Pflug@web.de>
To: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Cc: <pgadmin-hackers@postgresql.org>
Sent: Saturday, June 14, 2003 7:07 PM
Subject: Re: [pgadmin-hackers] ctlSQLBox ClientEncoding problem on Display?


(snip)
> Hiroshi,
>
> please do the following:
> - Store the definition of the table you are testing with to a file
> - Send the definition to me, so that I can create it in my database.
It mails by direct delivery independently.

>
> Still, this looks just like a wxWindows version that doesn't have the
> wxString patch applied. Please double check if you are using a corrected
> version. Maybe you mixed up debug and nondebug version? Rebuilt
> wxWindows release, but compiled pgAdmin3 debug thus effectively using
> wxWindows debug with old code?

1)WxWindows(cvs checkout 2003-06-12)
2) pgadmin3(cvs checkout 2003-06-12)
Since a link is divided with DEBUG and RELEASE and is performed, there is no
mixture.

I'm sorry.
Since a server cannot be accessed now, a situation cannot be told well.
A problem may be able to be seen also by the attached thing.
It is made to tell again on Monday in detail.

Regards,
Hiroshi Saito
(saito@inetrt.skcapi.co.jp)


Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas

A result wasn't desirable though I did Make by the thing of which moment.
Furthermore, even binary of snake that UPload was done the other day is the
same.
...
Debugging of Editor.cxx of WxWindows hasn't been able to be done yet.
...
I want to confirm.
why doesn't this phenomenon happen with your environment?
If it is my environment only, it becomes the thing of the problem of
Japanese Edition of Windows.
I am examined with the next environment, and a result is as the report.

Windows2000 sp3 , VC6 +sp5
WindowsXP
Windows2003

ScreenShot of the reference is a UNICODE version.
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug6.png
TEST-SQL(UTF8)
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug6.sql

If it is by Japanese edition, there is a problem in the deep.

Regards,
Hiroshi Saito

> (snip)
> > Hiroshi,
> >
> > please do the following:
> > - Store the definition of the table you are testing with to a file
> > - Send the definition to me, so that I can create it in my database.
> It mails by direct delivery independently.
>
> >
> > Still, this looks just like a wxWindows version that doesn't have the
> > wxString patch applied. Please double check if you are using a corrected
> > version. Maybe you mixed up debug and nondebug version? Rebuilt
> > wxWindows release, but compiled pgAdmin3 debug thus effectively using
> > wxWindows debug with old code?
>
> 1)WxWindows(cvs checkout 2003-06-12)
> 2) pgadmin3(cvs checkout 2003-06-12)
> Since a link is divided with DEBUG and RELEASE and is performed, there is
no
> mixture.
>
> I'm sorry.
> Since a server cannot be accessed now, a situation cannot be told well.
> A problem may be able to be seen also by the attached thing.
> It is made to tell again on Monday in detail.
>
> Regards,
> Hiroshi Saito
> (saito@inetrt.skcapi.co.jp)


Re: ctlSQLBox ClientEncoding problem on Display?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>I want to confirm.
>why doesn't this phenomenon happen with your environment?
>
Didn't have Japanese tables so far...
With your script I could create these tables and *did* get the same
problem. It was caused by another bug in wxString ctor. A fix is posted
to sourceforge, and I expect it to be committed quite soon.

I'll upload a corrected version 2003-06-17 to snake, as soon as
*.pgadmin.org hosts are available again.... :-(
Stay tuned.

Regards,
Andreas




Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas

It is very wonderful.!!
http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug7.png
The problem which I was afraid of in this was cleared.

Thank you. a great programmer.!

Regards,
Hiroshi Saito

----- Original Message -----
From: "Andreas Pflug" <Andreas.Pflug@web.de>
To: <pgadmin-hackers@postgresql.org>
Sent: Tuesday, June 17, 2003 8:42 AM
Subject: Re: [pgadmin-hackers] ctlSQLBox ClientEncoding problem on Display?


> Hiroshi Saito wrote:
>
> >I want to confirm.
> >why doesn't this phenomenon happen with your environment?
> >
> Didn't have Japanese tables so far...
> With your script I could create these tables and *did* get the same
> problem. It was caused by another bug in wxString ctor. A fix is posted
> to sourceforge, and I expect it to be committed quite soon.
>
> I'll upload a corrected version 2003-06-17 to snake, as soon as
> *.pgadmin.org hosts are available again.... :-(
> Stay tuned.
>
> Regards,
> Andreas


Re: ctlSQLBox ClientEncoding problem on Display?

From
Jean-Michel POURE
Date:
On Tuesday 17 June 2003 01:42, Andreas Pflug wrote:
> A fix is posted
> to sourceforge, and I expect it to be committed quite soon.

Hi Andreas,

Drop us a mail as soon as your patches are included in wxWindows, so I can
generate new wxGTK rpms automatically.

Cheers,
Jean-Michel


Re: ctlSQLBox ClientEncoding problem on Display?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas
>
>It is very wonderful.!!
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug7.png
>The problem which I was afraid of in this was cleared.
>
>
>
Hm,
that's interesting.
I still haven't been able to upload the files, so you're using an
unfixed version.
Because the phenomenon depends on random memory patterns, it might show
up again until the fix is done.

Regards,
Andreas



Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas.

Is it this?

CS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
retrieving revision 1.173
diff -r1.173 string.cpp
248,249c248,251
<         // calculate the needed size ourselves or use a provide one
<         nLen = nLength == wxSTRING_MAXLEN ? conv.MB2WC(NULL, psz, 0) :
nLength
;
---
>         // calculate the needed size ourselves or use a provide one if
less th
an calculated
>         nLen = conv.MB2WC(NULL, psz, 0);
>         if (nLength < nLen)
>             nLen = nLength;

It is the condition which it is completely all right as for by having
remodeled it.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Andreas Pflug" <Andreas.Pflug@web.de>
To: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Cc: <pgadmin-hackers@postgresql.org>
Sent: Tuesday, June 17, 2003 7:28 PM
Subject: Re: [pgadmin-hackers] ctlSQLBox ClientEncoding problem on Display?


> Hiroshi Saito wrote:
>
> >Hi Andreas
> >
> >It is very wonderful.!!
>
>http://cre-ent.skcapi.co.jp/~saito/pgadmin/lib/pgadmin3_unicode_debug7.png
> >The problem which I was afraid of in this was cleared.
> >
> >
> >
> Hm,
> that's interesting.
> I still haven't been able to upload the files, so you're using an
> unfixed version.
> Because the phenomenon depends on random memory patterns, it might show
> up again until the fix is done.
>
> Regards,
> Andreas


Re: ctlSQLBox ClientEncoding problem on Display?

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>Hi Andreas.
>
>Is it this?
>
>CS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
>retrieving revision 1.173
>diff -r1.173 string.cpp
>248,249c248,251
><         // calculate the needed size ourselves or use a provide one
><         nLen = nLength == wxSTRING_MAXLEN ? conv.MB2WC(NULL, psz, 0) :
>nLength
>;
>---
>
>
>>        // calculate the needed size ourselves or use a provide one if
>>
>>
>less th
>an calculated
>
>
>>        nLen = conv.MB2WC(NULL, psz, 0);
>>        if (nLength < nLen)
>>            nLen = nLength;
>>
>>
>
>It is the condition which it is completely all right as for by having
>remodeled it.
>
>
Correct,
that's the required fix.
As soon as the fix is in the official cvs, I'll check the whole package
and denominate the required cvs version.

Regards,
Andreas



Re: ctlSQLBox ClientEncoding problem on Display?

From
"Hiroshi Saito"
Date:
Hi Andreas.

From: "Andreas Pflug"
> Hiroshi Saito wrote:
(snip)
> >
> >It is the condition which it is completely all right as for by having
> >remodeled it.
> >
> >
> Correct,
> that's the required fix.
> As soon as the fix is in the official cvs, I'll check the whole package
> and denominate the required cvs version.

OK.
Once again, it follows guidance as a formal cvs version.

Regards,
Hiroshi Saito