# \[AS3\] System.useCodePage = true

**URL:** <https://forum.kirupa.com/t/as3-system-usecodepage-true/263333>\
**Category:** flash\
**Created:** [June 14, 2008, 4:49pm UTC](https://forum.kirupa.com/t/as3-system-usecodepage-true/263333 "2008-06-14T16:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gazurt](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gazurt/32/4060_2.png) [@Gazurt](https://forum.kirupa.com/u/Gazurt)\
**Post date:** [June 14, 2008, 4:49pm UTC](https://forum.kirupa.com/t/as3-system-usecodepage-true/263333/1 "2008-06-14T16:49:46Z")

</div>

This is my AS2 code:[FONT=monospace]  
[/FONT]

```php
System.useCodepage=true;
var xml:XML = new XML();
xml.ignoreWhite=true
xml.load("http://www.flasherblog.com/yeni/read/dergi_oku.php");
//
xml.onLoad = function (ok) {
    trace(xml);
}

```

[FONT=monospace]

When you test there is no error.

This is the AS3 version of that code:  
[/FONT]

```php
System.useCodePage=true;
var testXML:XML = new XML();

var urlLoader:URLLoader =new URLLoader();
urlLoader.load(new URLRequest("http://www.flasherblog.com/yeni/read/dergi_oku.php"));
urlLoader.addEventListener(Event.COMPLETE, onXMLLoad);

function onXMLLoad(e:Event):void {
    testXML = new XML(urlLoader.data);
    testXML.ignoreWhitespace=true;
    trace(testXML);
}

```

[FONT=monospace] When I test it, I am getting this error:

[/FONT]

> TypeError: Error #1090: XML parser failure: element is malformed.  
> at Untitled\_fla::MainTimeline/onXMLLoad()  
> at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()  
> at flash.events::EventDispatcher/dispatchEvent()  
> at [flash.net](http://flash.net)::URLLoader/flash.net:URLLoader::onComplete()

[FONT=monospace]

What is the problem? How can I solve this?  
[/FONT]
