On Sep 21, 2011, at 1:52 PM, Greg Sabino Mullane wrote:
> Since nobody has actally defined a specific interface yet, let me throw out a
> straw man. It may look familiar :)
>
> ===
> * $h->{unicode_flag}
>
> If this is set on, data returned from the database is assumed to be UTF-8,
> and
> the utf8 flag will be set.
I assume you also mean to say that data sent *to* the database has the flag
turned off, yes?
> DBDs will decode the data as needed.
I don't understand this sentence. If the flag is flipped, why will it decode?
> If this is set off, the utf8 flag will never be set, and no decoding will be
> done
> on data coming back from the database.
What if the data coming back from the database is Big5 and I want to decode it?
> If this is not set (undefined), the underlying DBD is responsible for doing
> the
> correct thing. In other words, the behaviour is undefined.
> ===
>
> I don't think this will fit into DBD::Pgs current implementation perfectly,
> as
> we wouldn't want people to simply leave $h->{unicode_flag} on, as that would
> force SQL_ASCII text to have utf8 flipped on. Perhaps we simply never, ever
> allow that.
You mean never allow it to be flipped when the database encoding is SQL_ASCII?
Best,
David