I am using xml and have a problem with Turkish characters. Just like this
<Ürün></Ürün>...
I use str_replace for solution but it’s not giving desired results.
What do I have to do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The above XML snippet is perfectly valid, as long as you’ve saved the XML with the correct character encoding. The default encoding for XML, if you don’t specify a different one in the
<?xmldeclaration, is UTF-8.If you have saved the file containing
<Ürün>in a different encoding to UTF-8 — presumably Windows code page 1254 Turkish — it will not parse as UTF-8, so either add a<?xml version="1.0" encoding="windows-1254"?>declaration or, much better and more portable, simply save it as UTF-8 instead. Use ‘Save as’ in your text editor and pick out that encoding.(If your text editor does not afford you that option, or it insists on re-loading UTF-8 files in code page 1254, get a better text editor.)