Thread MySQL und utf8mb4 (27 answers)
Opened by rosti at 2023-06-14 18:04

rosti
 2023-06-14 18:04
#195011 #195011
User since
2011-03-19
3257 Artikel
BenutzerIn
[Homepage]
user image
MySQL hat bei mir 5.6.45-log und ich hab mir mal 2 Zeichen näher angeschaut mit der Frage ob eine Abfrage upper() funktioniert. Also mit dem kleinen ß funktioniert es schonmal nicht bei mir. Mit dem OLD HUNGARIAN SMALL LETTER ER funktioniert es auch nicht, Code:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
$dbh->do(q(
    create table cc(
        c varchar(1) charset utf8mb4
    )default charset utf8mb4
));
$dbh->do("set names utf8mb4");
$dbh->{mysql_enable_utf8mb4} = 1;
$dbh->do("insert into cc(c)values(?)",{}, pack "U", 0x10CE2);
print Dumper $dbh->selectrow_hashref("select hex(c),c,upper(c) from cc");
$dbh->do('drop table cc');


Ergebnis ist:
Code: (dl )
1
2
3
4
5
$VAR1 = {
'upper(c)' => "\x{10ce2}",
'hex(c)' => 'F090B3A2',
'c' => "\x{10ce2}"
};


Aber rauskommen sollte laut UNICODE-Konsortium: 10CA2 OLD HUNGARIAN CAPITAL LETTER ER

Geht das bi Euch?

View full thread MySQL und utf8mb4