On Jul 21, 2011, at 4:01 PM, Greg Sabino Mullane wrote:

>> I think that setting pg_encoding should always turn pg_unicode *on*.
> 
> Hm...no, I think it should always be off. If someone really wants a different 
> encoding, they probably are used to it coming back "raw". David C, 
> I think we talked about this?

I disagree. It's me telling DBD::Pg what encoding the database uses, but I 
definitely want that converted to Perl's internal form. I *only* want raw if I 
explicitly ask for raw (or if there's no choice, such as when I set the 
encoding to ":raw" or something).

I think of it being kind of like the `encdoding` pragma, in which I declare the 
encoding of my source code. Perl sees that and converts it to its internal form.

>> Maybe. I think a lot of existing installations may find they need to 
>> turn it off, unless they had been using pg_enable_utf8 before.
> 
> Yep: no way to know until we release. David and I were thinking that the 
> other direction (data going to database) is probably more likely to 
> break things.

I wonder if, as an interrime measure, existing code that sets pg_enable_utf8 
should still do something, like set pg_encoding to "utf-8" and turn pg_unicode 
on.

>> Oh I agree, I just think it's worth putting off until this other stuff 
>> gets sorted out.
> 
> Nah, the more stuff we can fix out of the gate the better.

Okay.

>> Have you asked Tim Bunce about any of this stuff? I know he has 
>> thought about adding encoding knobs to the DBI core, but I don't 
>> know how far a long he got in thinking about a design.
> 
> Good idea: I have not. Will try to do so. Or anyone else that wants to 
> raise this on dbi-dev....

Yes, a must, IMHO. More cooks! ;-P

Best,

David

Reply via email to