I have a file UTF-8 encoding in windows, and when i use it under windows it shows everithing right, but when i copy the file in Linux, the Unicode characters are giberish. The file is plain textfile. How can i get this file to be readable in linux, or how can i copy it properly??
thanks in advance
Looks like an Apache/PHP issue
Are you running your strings through PHP’s built-in htmlspecialchars method (or similar)? If so, you may need to switch its encoding to UTF8
Instead of
htmlspecialchars($mytext), try usinghtmlspecialchars($mytext, ENT_COMPAT, 'UTF-8')Note the following (my previous answer) is incorrect, as Michael Burr notes, UTF-8 doesn’t need or use the BOM.