tags:

views:

52

answers:

1

Hi

I am using xml,and I have ad problem with turkish characters.Just like this

<Ürün></Ürün>...

I use str_replace for solition but its not desirable :(

what do i have to do=?

+3  A: 

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 <?xml declaration, 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.)

bobince
Yes You are excatly right.it solve my question.thank you very much
gadirzade
Great, in that case, please mark his answer as accepted.
Tim Pietzcker
> Great, in that case, ...<br/>I second that. :)
martinr