Force UTF-8 output and switch the palette to neutral gray

Explicitly set the Content-Type charset (PHP's default_charset can be
overridden by the host, which breaks oe/ae/ue even though the meta
tag says UTF-8) and add matching .htaccess/schema collation. Verified
end-to-end that umlauts round-trip correctly through the DB and render
correctly in the browser. Also replaced the dark blue-tinted palette
with true neutral grays; the gold accent stays.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-18 06:58:53 +02:00
parent 5811019908
commit 3c72d0ed7e
4 changed files with 19 additions and 11 deletions

View file

@ -1,5 +1,6 @@
Options -Indexes Options -Indexes
DirectoryIndex index.php index.html DirectoryIndex index.php index.html
AddDefaultCharset UTF-8
<IfModule mod_headers.c> <IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff" Header set X-Content-Type-Options "nosniff"

View file

@ -1,10 +1,10 @@
:root { :root {
--bg: #14141c; --bg: #1a1a1a;
--bg-panel: #1e1e2a; --bg-panel: #232323;
--bg-panel-alt: #262635; --bg-panel-alt: #2e2e2e;
--border: #33334a; --border: #3d3d3d;
--text: #e8e6e3; --text: #e8e8e8;
--text-muted: #a3a1b0; --text-muted: #a0a0a0;
--gold: #c9a227; --gold: #c9a227;
--gold-hover: #e0b930; --gold-hover: #e0b930;
--danger: #d9534f; --danger: #d9534f;

View file

@ -4,6 +4,13 @@ declare(strict_types=1);
error_reporting(E_ALL); error_reporting(E_ALL);
ini_set('display_errors', '0'); ini_set('display_errors', '0');
// Manche Hoster liefern per Default einen abweichenden Zeichensatz im
// Content-Type-Header aus, der die <meta charset>-Angabe im HTML ueberstimmt
// und dann Umlaute (oe/ae/ue) kaputt macht. Deshalb hier explizit erzwingen.
ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
header('Content-Type: text/html; charset=UTF-8');
if (session_status() !== PHP_SESSION_ACTIVE) { if (session_status() !== PHP_SESSION_ACTIVE) {
session_set_cookie_params([ session_set_cookie_params([
'httponly' => true, 'httponly' => true,

View file

@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS users (
must_change_password TINYINT(1) NOT NULL DEFAULT 0, must_change_password TINYINT(1) NOT NULL DEFAULT 0,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_login DATETIME NULL last_login DATETIME NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS roles ( CREATE TABLE IF NOT EXISTS roles (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
@ -20,13 +20,13 @@ CREATE TABLE IF NOT EXISTS roles (
description VARCHAR(255) NOT NULL DEFAULT '', description VARCHAR(255) NOT NULL DEFAULT '',
is_system TINYINT(1) NOT NULL DEFAULT 0, is_system TINYINT(1) NOT NULL DEFAULT 0,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS permissions ( CREATE TABLE IF NOT EXISTS permissions (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`key` VARCHAR(100) NOT NULL UNIQUE, `key` VARCHAR(100) NOT NULL UNIQUE,
description VARCHAR(255) NOT NULL DEFAULT '' description VARCHAR(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS role_permissions ( CREATE TABLE IF NOT EXISTS role_permissions (
role_id INT UNSIGNED NOT NULL, role_id INT UNSIGNED NOT NULL,
@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS role_permissions (
PRIMARY KEY (role_id, permission_id), PRIMARY KEY (role_id, permission_id),
FOREIGN KEY (role_id) REFERENCES roles(id) ON DELETE CASCADE, FOREIGN KEY (role_id) REFERENCES roles(id) ON DELETE CASCADE,
FOREIGN KEY (permission_id) REFERENCES permissions(id) ON DELETE CASCADE FOREIGN KEY (permission_id) REFERENCES permissions(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS user_roles ( CREATE TABLE IF NOT EXISTS user_roles (
user_id INT UNSIGNED NOT NULL, user_id INT UNSIGNED NOT NULL,
@ -42,4 +42,4 @@ CREATE TABLE IF NOT EXISTS user_roles (
PRIMARY KEY (user_id, role_id), PRIMARY KEY (user_id, role_id),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY (role_id) REFERENCES roles(id) ON DELETE CASCADE FOREIGN KEY (role_id) REFERENCES roles(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;