Re: BUG #6344: Trouble with plperl

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: BUG #6344: Trouble with plperl
Дата
Msg-id CAFaPBrT=+ENFrJWNg7Z80XxsV3RvOTpExYm5BhAC+k6PTQ0=0g@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #6344: Trouble with plperl  (k_denisov@inbox.ru)
Список pgsql-bugs
On Sun, Dec 18, 2011 at 01:25,  <k_denisov@inbox.ru> wrote:
> The following bug has been logged on the website:
>
> Bug reference: =C2=A0 =C2=A0 =C2=A06344
> Logged by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Kirill
> Email address: =C2=A0 =C2=A0 =C2=A0k_denisov@inbox.ru
> PostgreSQL version: 9.1.2
> Operating system: =C2=A0 Linux Debian
> Description:
>
> plperl function:
> open(FILE,">>/test/test.txt");
> print FILE "=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0(Cyrillic tex=
t)";
> close FILE;
> Base codepage and client codepage cp1251.
> Record in file broken codepage.

Im not exactly sure what you are saying, but my hunch is you need to
use Encode or give the file handle an encoding:
binmode(FILE, ':encoding(cp1251)'); (or via open)

or

use Encode qw(encode);
my $str =3Ddecode("cp1251", "=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=
=B0(Cyrillic text));
print FILE $str;

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

Предыдущее
От: Martin Pitt
Дата:
Сообщение: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Следующее
От: manojk.softengineer@gmail.com
Дата:
Сообщение: BUG #6345: "forget the password for reinstallaion"