From: Andreas Joseph Krogh <andreak@officenet.no>
To: pgsql-sql@postgresql.org
Subject: Problem with LATIN1 characters from Perl-DBI
Date: Tue, 7 Sep 2004 14:06:31 +0200
Message-ID: <200409071406.40262.andreak@officenet.no> (raw)
Hi.
I have a database created with -E LATIN1. Inserting norwegian characters lik
'ø' works perfectly from JDBC, but from Perl, it stores the word 'søker' as
'søker'(UNICODE).
perl --version:
This is perl, v5.8.3 built for i386-linux-thread-multi
A Mandrake-10 Linux system.
I first had the problem printing out LATIN1 chars to stdout too, but solved
that by using the pragma
use encoding 'ISO-8859-1';
I've tried:
$dbh->do("set CLIENT_ENCODING TO 'ISO-8859-1'")
or die("Couldn't set encoding to ISO-8859-1");
but that didn't work.
Any hints anyone?
--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS | Two tomatoes in a fridge. One tomato says |
Hoffsveien 17 | to the other, "It's cold in here, isn't it?"|
PO. Box 425 Skøyen | The other tomato says, "F**king hell, |
0213 Oslo | a talking tomato!" |
NORWAY | |
Phone : +47 22 13 01 00 | |
Direct: +47 22 13 10 03 | |
Mobile: +47 909 56 963 | |
------------------------+---------------------------------------------+
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andreak@officenet.no
Subject: Re: Problem with LATIN1 characters from Perl-DBI
In-Reply-To: <200409071406.40262.andreak@officenet.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox