Are Umlaut characters being stored correctly in the SQL database?

When storing Umlaut characters in an SQL database, it is important to ensure that the database is configured to support UTF-8 encoding. This will allow the database to correctly store and retrieve special characters like Umlauts. Additionally, when inserting data into the database using PHP, make sure to set the character set to UTF-8 to ensure proper handling of Umlaut characters.

// Connect to the database with UTF-8 encoding
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database";

$conn = new mysqli($servername, $username, $password, $dbname);
$conn->set_charset("utf8");

// Insert data into the database with UTF-8 encoding
$data = "Umlaut characters: ä, ö, ü";
$sql = "INSERT INTO table_name (column_name) VALUES ('$data')";
$conn->query($sql);

// Close the database connection
$conn->close();