Skip site navigation (1) Skip section navigation (2)

pgsql: Fix usage of char2wchar/wchar2char.

From: teodor(at)postgresql(dot)org (Teodor Sigaev)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix usage of char2wchar/wchar2char.
Date: 2009-03-02 15:10:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Fix usage of char2wchar/wchar2char. Changes:
- pg_wchar and wchar_t could have different size, so char2wchar
  doesn't call pg_mb2wchar_with_len to prevent out-of-bound
  memory bug
- make char2wchar/wchar2char symmetric, now they should not be 
  called with C-locale because mbstowcs/wcstombs oftenly doesn't 
  work correct with C-locale.
- Text parser uses pg_mb2wchar_with_len directly in case of
  C-locale and multibyte encoding
Per bug report by Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> and
following discussion.
Backpatch up to 8.2 when multybyte support was implemented in tsearch.

Modified Files:
        wparser_def.c (r1.20 -> r1.21)
        mbutils.c (r1.78 -> r1.79)

pgsql-committers by date

Next:From: Teodor SigaevDate: 2009-03-02 15:11:25
Subject: pgsql: Fix usage of char2wchar/wchar2char.
Previous:From: Hiroshi SaitoDate: 2009-03-02 14:44:03
Subject: Re: Re: [COMMITTERS] pgsql: Redefine _() to dgettext() instead of gettext() so that it uses

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group