-- sample-utf8-bom-crlf.sql: text in many scripts, saved as UTF-8 with a -- byte order mark and Windows (CRLF) line endings. -- Free sample from 99helpers.com/file-types/sql -- -- Runs on PostgreSQL, MySQL and SQLite. psql, the mysql client and -- sqlite3 all read the BOM and CRLF without trouble in our tests; some -- older tools don't, which is what this file is for. If any text below -- comes back garbled, a step didn't treat the file as UTF-8. -- -- The mysql client takes its character set from your system's locale, so -- name it to be sure: mysql --default-character-set=utf8mb4 db < file DROP TABLE IF EXISTS greetings; CREATE TABLE greetings ( id INTEGER PRIMARY KEY, language VARCHAR(40) NOT NULL, greeting VARCHAR(100) NOT NULL ); -- In MySQL the table needs the utf8mb4 character set (the default since -- MySQL 8.0) for the emoji row; older "utf8" tables reject it. INSERT INTO greetings (id, language, greeting) VALUES (1, 'English', 'Hello'), (2, 'Dutch', 'Hallo, één keer'), (3, 'German', 'Grüße aus Köln'), (4, 'French', 'Ça va? À bientôt'), (5, 'Polish', 'Zażółć gęślą jaźń'), (6, 'Greek', 'Γειά σου κόσμε'), (7, 'Russian', 'Привет, мир'), (8, 'Arabic', 'مرحبا بالعالم'), (9, 'Hebrew', 'שלום עולם'), (10, 'Hindi', 'नमस्ते दुनिया'), (11, 'Chinese', '你好,世界'), (12, 'Japanese', 'こんにちは世界'), (13, 'Korean', '안녕하세요 세계'), (14, 'Emoji', 'Hi 👋🌍'), (15, 'Quotes', 'It''s “curly” and ‘single’'); -- Sorting text depends on the collation: the order of accented letters and -- other scripts can differ between databases and settings. SELECT id, language, greeting FROM greetings ORDER BY id;