This is relating to UTF-8, PHP and XML Mysql, which I am still trying to get my head around.
I Have a couple of separate questions that will hopefully help me understand how to resolve the issues I am having.
I am trying to read values from a database and output into a file in UTF-8 format. But I am having encoding issues, so i thought I would strip back all my code ans start with:
$string = "Otivägen";
// then output to a file.
But in vim i cant even enter the that string, every time I paste it in I get Otivägen
I tried to create a blank PHP file with only that string and upload it, but when I cat the file again I get Otivägen.
My questions are ...
- Why is
vimdisplaying it like this? - If the file is downloaded would it display correctly if an application was expecting UTF-8?
- How can I output this string into a file that will eventually be an XML file in UTF-8 encoding.
My understanding of encoding is limited at the moment, and I am trying to understand it.
localein terminal?) it might helph if you switch your whole system to a UTF-8 locale. Although that will give you a mess with all non-UTF-8 filenames :-(