# PHP-XML-Flash, encoding problem

**URL:** <https://forum.kirupa.com/t/php-xml-flash-encoding-problem/258246>\
**Category:** programming\
**Created:** [April 22, 2008, 12:55pm UTC](https://forum.kirupa.com/t/php-xml-flash-encoding-problem/258246 "2008-04-22T12:55:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![komapeb](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@komapeb](https://forum.kirupa.com/u/komapeb)\
**Post date:** [April 22, 2008, 12:55pm UTC](https://forum.kirupa.com/t/php-xml-flash-encoding-problem/258246/1 "2008-04-22T12:55:34Z")

</div>

Hello!  
I’m a newbie in PHP so please be patient if you want to help me :}.  
Here is my idea:  
I have a PHP script which “looks” through certain folders and then writes a XML with information about the files in the folders (which are pictures). Then Flash is supposed to get the information from the XML. It’s all OK and works perfect. [SIZE=4]BUT[/SIZE] when I want to put some cyrillic characters Flash display them as small squares.  
I’ve had this problem before and I know the solution: I save the XML (with notepad or something else) with UTF-8 encoding and Flash display the characters normally.  
[SIZE=4]BUT[SIZE=2] I have too many XML files! I tried to set the encoding as attribute like that:[/SIZE][/SIZE]

```auto
<?xml version="1.0" encoding="utf-8"?>
...here are the nodes...

```

But I get the same result.  
When i open the file in notepad and choose “File-\>Save as” then adjust the “Encoding” to “UTF-8” and save the file Flash “sees” the cyrillic characters. Can PHP do this last step for me?  
Thank you verry much for helping me!

[SIZE=1]p.s. Sorry for my English.[/SIZE]
