Almost certainly not the font itself. Looks like classic mojibake. The
sequence which you seem to report, capital A circumflex, one-half might be
in the encoding ISO-8859-1 (aka Windows-1252 aka informally Latin1).

If so we have
c2 - capital A circumflex
bd - one half

But what is the UTF-8 form of one-half? It is c2bd.  So this seems the
classic case of interpreting UTF-8 as ISO-8859-1. Where that is happening
is for you to find, but my bet is that it is later than you think.

On 22 June 2016 at 17:32, tridiak <trid...@ihug.co.nz
<javascript:_e(%7B%7D,'cvml','trid...@ihug.co.nz');>> wrote:

> I am setting some text to a NSTextView which includes the ‘½’ character.
>
> s = name + “ CR "
> switch (CR) {
>         case 0.5:
>                 s=s+”½” // \u{00bd}
> ...
> let d : NSData = s.dataUsingEncoding(NSUTF8StringEncoding)!
> let ats : NSMutableAttributedString = NSMutableAttributedString(HTML: d,
> documentAttributes: nil)!
> self.blab.textStorage?.setAttributedString(ats)
>
> What I see is 'Aasimar CR ½’ instead of 'Aasimar CR ½’.
> Where is the ‘Â' coming from?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to