dreamwieber/AttributedMarkdown — pull request #23 by obeattie (2014-04-30 16:34:04+00:00)
Title: Fix Unicode problems

As per #13, Unicode support is presently poor, and use of non-Latin scripts quickly results in broken output.

The problem is the [use of `characterAtIndex:`](https://github.com/dreamwieber/AttributedMarkdown/blob/2bde0b6f90326ff0bbcd3e184e7e0f6972ff2aa3/utility_functions.m#L223) in the `YY_INPUT` macro. Building a string relying on this doesn't work as this returns a `unichar`, a 16-bit value.

I've changed the internals of the parser to avoid passing around an `NSString`, instead converting to a C string right out of the gate using `UTF8String`. In my testing, this handles any Unicode I can throw at it (including all the broken characters mentioned in the previous issue).