From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Vitali Stupin <vitali(dot)stupin(at)ria(dot)ee>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] BUG #2683: spi_exec_query in plperl returns |
Date: | 2006-10-16 14:10:44 |
Message-ID: | 20061016141044.GB23302@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Sun, Oct 15, 2006 at 06:15:27PM -0400, Tom Lane wrote:
> "Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> > I am also wondering, now that it's been raised, if we need to issue a "use
> > utf8;" in the startup code, so that literals in the code get the right
> > encoding.
>
> Good question. I took care to ensure that the code strings passed to
> Perl are marked as UTF8; perhaps that makes it happen implicitly?
> If not, are there any downsides to issuing "use utf8"?
What "use utf8" does is allow the *source* to be in utf8, thus affecting
what's a valid identifier and such. It doesn't affect the data, for
that you need "use encoding 'utf8'".
It's clear whether you actually want to allow people to put utf8
characters directly into their source (especially if the database is
not in utf8 encoding anyway). There is always the \u{xxxx} escape.
The perlunicode man page describe it better, though I only have
perl5.8. In know the perl5.6 model was different and somewhat more
awkward to use.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-10-16 14:24:02 | Re: BUG #2694: Memory allocation error when selecting array of empty arrays |
Previous Message | Tom Lane | 2006-10-16 14:00:13 | Re: BUG #2683: spi_exec_query in plperl returns column names which are not marked as UTF8 |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-10-16 14:28:06 | Re: [HACKERS] BUG #2683: spi_exec_query in plperl returns |
Previous Message | Merlin Moncure | 2006-10-16 14:00:34 | Re: Postgresql Caching |