The following example shows how you can detect the default encoding used by the host operating system by using the static File.systemCharset property.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!-- http://airexamples.com/2008/12/25/detecting-the-default-encoding-used-by-the-host-operating-system-in-adobe-air/ -->
<mx:WindowedApplication name="File_systemCharset_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        height="200">
 
    <mx:VBox>
        <mx:Label text="File.systemCharset:" />
        <mx:Label text="{File.systemCharset}"
                selectable="true"
                fontSize="48" />
    </mx:VBox>
 
</mx:WindowedApplication>
Tagged with:
 

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Spam Protection by WP-SpamFree