Thread [PHP] PDO und utf8 (49 answers)
Opened by rosti at 2023-06-06 13:34

Linuxer
 2023-06-14 16:10
#195002 #195002
User since
2006-01-27
3881 Artikel
HausmeisterIn

user image
Die MySQL Entwickler wagen es aber, dir zu widersprechen und anderes zu behaupten:

https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html
utf8mb4: A UTF-8 encoding of the Unicode character set using one to four bytes per character.
(Hervorhebung von mir)

Und
https://dev.mysql.com/doc/refman/8.0/en/storage-requirements.html#data-types-storage-reqs-strings
To calculate the number of bytes used to store a particular CHAR, VARCHAR, or TEXT column value, you must take into account the character set used for that column and whether the value contains multibyte characters. In particular, when using a UTF-8 Unicode character set, you must keep in mind that not all characters use the same number of bytes. utf8mb3 and utf8mb4 character sets can require up to three and four bytes per character, respectively. For a breakdown of the storage used for different categories of utf8mb3 or utf8mb4 characters, see Section 10.9, “Unicode Support”.
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread [PHP] PDO und utf8