1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/env perl use warnings; use 5.12.0; use open qw(:std :utf8); use DBI; my $dbh = DBI->connect( "dbi:mysql:db=$db", $user, $pass, { RaiseError => 1, mysql_enable_utf8mb4 => 1, # oder mysql_enable_utf8mb4 => 0, mysql_enable_utf8 => 0, # oder mysql_enable_utf8 => 1 } ); my $sth = $dbh->prepare( "SELECT * FROM $table" ); $sth->execute(); my @ary = $sth->fetchrow_array; say join '|', @ary;
1 2 3 4 5 6
use strict; use warnings; use open qw(:std :utf8); my $c = pack "CC", 195, 164; # Bytes für 'ä' print $c; # Müll