Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Avoid mojibake when opening data files.
UTF-8 in CSV & Excel is easiest to learn by reading the example, changing it, and observing the result.
<?php
// Write a CSV that Excel opens as UTF-8 by adding a BOM
$fh = fopen('export.csv', 'w');
fwrite($fh, "\xEF\xBB\xBF"); // UTF-8 BOM
fputcsv($fh, ['Name', 'City']);
fputcsv($fh, ['José', '東京']);
fclose($fh);
// Without the BOM, Excel often shows "José" (mojibake).Practice the UTF-8 in CSV & Excel example in a small scratch file, then explain what changed and why.