Detecting the default encoding used by the host operating system in Adobe AIR
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>
