Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-16 Thread Ronald Peterson
Still trying to figure this out, still confused, but like most frustrating programming problems, I think I may be looking in the wrong place for the source of this error. Perhaps. On Wed, Jul 15, 2015 at 11:25 PM, Tom Lane wrote: > Ronald Peterson writes: > > This does work for strings that do

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Tom Lane
Ronald Peterson writes: > This does work for strings that don't contain consecutive zeroes. I'm not > really passing the string to PostgreSQL, but to Net::LDAP, but it must hit > PostgreSQL anyway? Active Directory requires this encoding, so I'm not > sure what to do here. Hm, well, the concret

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Ronald Peterson
Thanks Pavel, this looks promising. I didn't know about the Data::Peek module - that might help me figure out what is going on. On Wed, Jul 15, 2015 at 2:28 PM, Pavel Stehule wrote: > > > 2015-07-15 20:20 GMT+02:00 Ronald Peterson : > >> That's interesting. What I'm really doing, instead of th

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Pavel Stehule
2015-07-15 20:20 GMT+02:00 Ronald Peterson : > That's interesting. What I'm really doing, instead of the second elog > statement, is this: > > $ret = $ldap->modify( $dn, > replace => { > unicodePwd => $mspass > } ); > > This does wo

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Ronald Peterson
That's interesting. What I'm really doing, instead of the second elog statement, is this: $ret = $ldap->modify( $dn, replace => { unicodePwd => $mspass } ); This does work for strings that don't contain consecutive zeroes. I'm not

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Daniel Verite
Ronald Peterson wrote: > # select * from doublezero(); > INFO: double00 > CONTEXT: PL/Perl function "doublezero" > ERROR: invalid byte sequence for encoding "UTF8": 0x00 at line 8, > line 558. > CONTEXT: PL/Perl function "doublezero" > > I don't understand this. I need to pass $mspa

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Adrian Klaver
On 07/15/2015 07:14 AM, Ronald Peterson wrote: The following short function illustrates a problem I'm having with the plperlu module. CREATE OR REPLACE FUNCTION doublezero () RETURNS VOID AS $$ use Encode qw/encode decode/; $pass = "double00"; elog( INFO, "$pass" ); $mspass = encode( 'UTF-16LE',

[GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Ronald Peterson
The following short function illustrates a problem I'm having with the plperlu module. CREATE OR REPLACE FUNCTION doublezero () RETURNS VOID AS $$ use Encode qw/encode decode/; $pass = "double00"; elog( INFO, "$pass" ); $mspass = encode( 'UTF-16LE', qq("$pass") ); elog( INFO, "$mspass" ); $$ LANGU

Re: [GENERAL] UTF8 encoding problem

2008-06-18 Thread Giorgio Valoti
On 18/giu/08, at 15:00, Michael Fuhr wrote: On Wed, Jun 18, 2008 at 08:25:07AM +0200, Giorgio Valoti wrote: On 18/giu/08, at 03:04, Michael Fuhr wrote: Is the data UTF-8? If the error is 'invalid byte sequence for encoding "UTF8": 0xa3' then you probably need to set client_encoding to latin1

Re: [GENERAL] UTF8 encoding problem

2008-06-18 Thread Garry Saddington
On Wednesday 18 June 2008 14:00, Michael Fuhr wrote: > On Wed, Jun 18, 2008 at 08:25:07AM +0200, Giorgio Valoti wrote: > > On 18/giu/08, at 03:04, Michael Fuhr wrote: > > > Is the data UTF-8? If the error is 'invalid byte sequence for > > > encoding "UTF8": 0xa3' then you probably need to set clie

Re: [GENERAL] UTF8 encoding problem

2008-06-18 Thread Michael Fuhr
On Wed, Jun 18, 2008 at 08:25:07AM +0200, Giorgio Valoti wrote: > On 18/giu/08, at 03:04, Michael Fuhr wrote: > > Is the data UTF-8? If the error is 'invalid byte sequence for > > encoding "UTF8": 0xa3' then you probably need to set client_encoding > > to latin1, latin9, or win1252. > > Why? U

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Giorgio Valoti
On 18/giu/08, at 03:04, Michael Fuhr wrote: On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. What's the exact error message? I have set lc_monetary to "lc_monetary = 'en_GB.UTF-8'" in postgresq

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Garry Saddington
On Wednesday 18 June 2008 02:04, Michael Fuhr wrote: > On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: > > I am getting illegal UTF8 encoding errors and I have traced it to the £ > > sign. > > What's the exact error message? > > > I have set lc_monetary to "lc_monetary = 'en_GB.UT

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Michael Fuhr
On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: > I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. What's the exact error message? > I have set lc_monetary to "lc_monetary = 'en_GB.UTF-8'" in postgresql.conf > but > this has no effect. How can I so

[GENERAL] UTF8 encoding problem

2008-06-17 Thread Garry Saddington
I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. I have set lc_monetary to "lc_monetary = 'en_GB.UTF-8'" in postgresql.conf but this has no effect. How can I sort this problem? Client_encoding =UTF8. Regards Garry -- Sent via pgsql-general mailing list (pgsql-general