Created by Daniel on 11/22/2024
We use this on the entire database to set the collation. Please note that we only do this before importing a new database. We never use this on a current running database. Please make sure you have all necessary backups before attempting something like this.
ALTER DATABASE yourname CHARACTER SET utf8 COLLATE utf8_unicode_ci;
After this we will set the character set to UTF8 also. This prevents problems with special characters like é, ë, ü and a lot more.
SET NAMES UTF8; SET CHARACTER SET UTF8;
Sometimes if we forget to do this the pages show strange character after the database import while moving a TYPO3 website to another server.