From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | k_denisov(at)inbox(dot)ru |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #6344: Trouble with plperl |
Date: | 2011-12-19 00:35:54 |
Message-ID: | CAFaPBrT=+ENFrJWNg7Z80XxsV3RvOTpExYm5BhAC+k6PTQ0=0g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sun, Dec 18, 2011 at 01:25, <k_denisov(at)inbox(dot)ru> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 6344
> Logged by: Kirill
> Email address: k_denisov(at)inbox(dot)ru
> PostgreSQL version: 9.1.2
> Operating system: Linux Debian
> Description:
>
> plperl function:
> open(FILE,">>/test/test.txt");
> print FILE "Проверка(Cyrillic text)";
> 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 =decode("cp1251", "Проверка(Cyrillic text));
print FILE $str;
From | Date | Subject | |
---|---|---|---|
Next Message | manojk.softengineer | 2011-12-19 05:19:39 | BUG #6345: "forget the password for reinstallaion" |
Previous Message | Martin Pitt | 2011-12-18 22:42:03 | [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb] |