On Sun, Dec 18, 2011 at 01:25,  <[email protected]> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      6344
> Logged by:          Kirill
> Email address:      [email protected]
> 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;

-- 
Sent via pgsql-bugs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to