Thread: pgAdmin3 and gtk2.0/Unicode: done

pgAdmin3 and gtk2.0/Unicode: done

From
Andreas Pflug
Date:
Friends of good software,

the problem with wxWindows 2.5/gtk2/Unicode is located. A wxString
constructor didn't terminate the buffer correctly (only ps, not psz :-),
which leads to uncontrollable behaviour. The attached fix is already
posted as wxWindows.Sourceforge patch.

pgAdmin3 works correctly with this, so I'd recommend this as the primary
platform from now on.
I'm quite happy about this, because the dialog/font metric calculation
is much better, giving virtually the same display as unter Win32.

Regards,
Andreas
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
retrieving revision 1.172
diff -r1.172 string.cpp
269a270
>           m_pchData[nLen] = 0;


Re: pgAdmin3 and gtk2.0/Unicode: done

From
Jean-Michel POURE
Date:
Le Vendredi 06 Juin 2003 00:13, Andreas Pflug a écrit :
> RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
> retrieving revision 1.172
> diff -r1.172 string.cpp
> 269a270
>
> >           m_pchData[nLen] = 0;

Hi Andreas,

Could you submit a patch in diff -u format? I don't have enough context to
apply it. What CVS version are you using?

Cheers,
Jean-Michel

****************************************************************************************
int wxString::Find(wxChar ch, bool bFromEnd) const
{
  const wxChar *psz = bFromEnd ? wxStrrchr(m_pchData, ch) :
wxStrchr(m_pchData, ch);

  return (psz == NULL) ? wxNOT_FOUND : psz - (const wxChar*) m_pchData;
}

// find a sub-string (like strstr)
int wxString::Find(const wxChar *pszSub) const
{
  const wxChar *psz = wxStrstr(m_pchData, pszSub);

  return (psz == NULL) ? wxNOT_FOUND : psz - (const wxChar*) m_pchData;
}