Author: turnstep
Date: Mon May 18 06:37:01 2009
New Revision: 12776

Modified:
   DBD-Pg/trunk/t/02attribs.t
   DBD-Pg/trunk/t/09arrays.t

Log:
Skip unicode tests if server encoding is not UTF8.
Per reports from Curtis Jewell when using WIN1252


Modified: DBD-Pg/trunk/t/02attribs.t
==============================================================================
--- DBD-Pg/trunk/t/02attribs.t  (original)
+++ DBD-Pg/trunk/t/02attribs.t  Mon May 18 06:37:01 2009
@@ -414,8 +414,8 @@
        skip ('Encode module is needed for unicode tests', 5) if $@;
 
        my $server_encoding = $dbh->selectall_arrayref('SHOW 
server_encoding')->[0][0];
-       skip ('Cannot test unicode with a LATIN1 database', 5)
-               if $server_encoding eq 'LATIN1';
+       skip ('Cannot reliably test unicode without a UTF8 database', 5)
+               if $server_encoding ne 'UTF8';
 
        $SQL = 'SELECT id, pname FROM dbd_pg_test WHERE id = ?';
        $sth = $dbh->prepare($SQL);

Modified: DBD-Pg/trunk/t/09arrays.t
==============================================================================
--- DBD-Pg/trunk/t/09arrays.t   (original)
+++ DBD-Pg/trunk/t/09arrays.t   Mon May 18 06:37:01 2009
@@ -546,8 +546,8 @@
        skip ('Encode module is needed for unicode tests', 14) if $@;
 
        my $server_encoding = $dbh->selectall_arrayref('SHOW 
server_encoding')->[0][0];
-       skip ('Cannot test unicode with a LATIN1 database', 14)
-               if $server_encoding eq 'LATIN1';
+       skip ('Cannot reliably test unicode without a UTF8 database', 14)
+               if $server_encoding ne 'UTF8';
 
        $t='String should be UTF-8';
        local $dbh->{pg_enable_utf8} = 1;

Reply via email to