I create a file with fopen and I want to save it in UTF-8 format.
The creation is made by request from the user.
Can anyone help me?
txt in UTF-8 format
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Write a BOM (Byte-order marker) then the rest of the file. A BOM isn't explicitly required, but is a good idea if the file is to be used with a program that does understand UTF-8. You may need to convert the incoming text to UTF-8, so look at mb_convert_encoding().