xref: /PHP-8.2/ext/pdo_firebird/tests/gh8576.phpt (revision 2fc9e769)
1--TEST--
2GH-8576 (Bad interpretation of length when char is UTF-8)
3--EXTENSIONS--
4pdo_firebird
5--SKIPIF--
6<?php require 'skipif.inc'; ?>
7--FILE--
8<?php
9require 'testdb.inc';
10
11$dbh->exec("CREATE TABLE gh8576 (name CHAR(1) CHARACTER SET UTF8)");
12$dbh->exec("INSERT INTO gh8576 VALUES ('A')");
13$stmt = $dbh->query("SELECT * FROM gh8576");
14var_dump($stmt->fetchAll());
15?>
16--EXPECT--
17array(1) {
18  [0]=>
19  array(2) {
20    ["NAME"]=>
21    string(1) "A"
22    [0]=>
23    string(1) "A"
24  }
25}
26--CLEAN--
27<?php
28require 'testdb.inc';
29$dbh->exec("DROP TABLE gh8576");
30?>
31