On 2014-02-06 12:30:15 +1100, Ron Savage wrote: > 'Major change in UTF-8 handling' is right. I was:
I haven't checked the docs yet, just my gut feeling how it should work. > o Declaring the Pg db as utf8 I guess this means setting pg_enable_utf8? > o Encoding outgoing data > Eg: map{($_ => encode('utf-8', $$hashref{$_}) )} keys %$hashref That seems superfluous to me. If you set pg_enable_utf8 I would expect the DBD to translate between perl character strings (aka 'utf8 strings', but you aren't supposed to know that and in newer perls the difference shouldn't matter any more) and whatever encoding the database expects. > o Decoding incoming data > $$item{$_} = decode('utf-8', $$item{$_} || '') for keys %$item Same here. With pg_enable_utf8 I would expect to get character strings, not byte strings, so no decode should be necessary. hp -- _ | Peter J. Holzer | I think we need two definitions: |_|_) | WSR - Softwaredevelopment | 1) The problem the *users* want us to solve | | | und Projektunterstützung | 2) The problem our solution addresses. __/ | h...@wsr.ac.at | -- Phillip Hallam-Baker on spam
signature.asc
Description: Digital signature