1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

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.

1 Comment »

  1. 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!

    Comment by James — 8 April 2008 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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