Work on cleaning up some unicode issues,

Unicode support (at least encoding/decoding should be good now)

I've figured out what the current issue is, but I'm not sure how to fix
it, the issue is a null pointer dereferenc in flex. a char * field it
the scanner called yy_c_buf_p is 0, but gets dereferenced (presumably
this is the input buffer, meaning for some reason flex isn't
initializing it's input buffer)