UTF-8 Bot – file encoding conversion with AIR

Well, here it is, my first Adobe AIR application from Flash.

utf-8bot.png

What does it do? Well, it takes an ANSI or Latin1 encoded text file, and spits it out in UTF-8 format. The need is pretty basic, and as is the core code, but it did give me an opportunity to delve into some of the ActionScript libraries that come with AIR. Mainly connected with the FileSystem, NativeDragDrop and classes related to custom chromes.

I particulary like the drag and drop classes – they turned out to be far easier than I’d expected. FileSystem on the other hand, turned out to be a bit more of a bugger to get working correctly. I was also mildly surprised how easy it was to lock the application to the bottom of the screen, just with some cunning use of stage.maximise and stageAlign.BOTTOM.

Anyway, I hope I can write some more in detail ‘tutorials’ about a few of the things I’ve learnt at a later date, and take you through the code, but for now…

Download the AIR File (Requires the Adobe AIR Runtime)

Download the source code (Requires Flash CS3)

Oh, and a little disclaimer; I’ve tested this repeatedly, and not noticed any problems, but just you know, be careful and don’t put anything crucial into the application. This is an experimental project, not a commercial one.

, , , ,

About James

James is a Senior New Media Developer at MMT Digital, and has BA(Hons) in Design for Interactive Media from the University of Gloucestershire. He loves designing and producing all sorts of website and Flash-related things, as well as prattling on about technologies.Day-to-day he works with Flash, Dreamweaver, Director, Microsoft Office Sharepoint Server 2007 (MOSS) and in his spare time he mucks about in Flex and Wordpress.Follow James on Twitter.

One Response to “UTF-8 Bot – file encoding conversion with AIR”

  1. James 8th April, 2008 at 12:37 pm # Reply

    Oops. I told you it was experimental, and just to prove it so, Pauls‘ just pointed out that it doesn’t actually save the files out as UTF-8 anymore.

    It did at one stage in the development, I assure you!

Leave a Reply

Note: This post is over 4 years old. You may want to check later in this blog to see if there is new information relevant to your comment.