Tuesday, 17 November 2009

what encoding is that?

A few times in a project I'm working on, I've got some binary data that represents encoded text in some unknown encoding. Sometimes I know what it should decode to, and sometimes not.

Encoding Tools is a small application that decodes a byte string in a bunch of ways, and tries to guess which is correct.

It runs on Mac OS X 10.5 or later, and the source is available from the link above.

Hadn't used "real" Cocoa (as opposed to Touch) in a while, so this was a good excuse to play with Bindings and NSTokenField.
The former is very cool, but not quite as seamless as I thought - you get your UI and model synced without writing any extra code, as long as you do things in a KVO-compliant way, which requires writing non-idiomatic extra code.
NSTokenField would be nice if it wasn't broken by default.

0 comments: