Author: timbo Date: Fri Feb 9 06:34:59 2007 New Revision: 8839 Modified: dbi/trunk/DBI.pm
Log: Specify that drivers should return utf8 for non-iso-8859-1 character data. Modified: dbi/trunk/DBI.pm ============================================================================== --- dbi/trunk/DBI.pm (original) +++ dbi/trunk/DBI.pm Fri Feb 9 06:34:59 2007 @@ -2219,14 +2219,11 @@ data to and from the driver without change. It is up to the driver implementors to decide how they wish to handle such binary data. -Most databases that understand multiple character sets have a -default global charset. Text stored in the database is, or should -be, stored in that charset; if not, then that's the fault of either -the database or the application that inserted the data. When text is -fetched it should be automatically converted to the charset of the -client, presumably based on the locale. If a driver needs to set a -flag to get that behaviour, then it should do so; it should not require -the application to do that. +Perl supports two kinds of strings: unicode (utf8 internally) and non-unicode +(defaults to iso-8859-1 if forced to assume an encoding). Drivers should +accept both kinds of strings and, if required, convert them to the character +set of the database being used. Similarly, when fetching from the database +character data that isn't iso-8859-1 the driver should convert it into utf8. Multiple SQL statements may not be combined in a single statement handle (C<$sth>), although some databases and drivers do support this
