Re: NSNumberFormatter negative and NSWindowsLatin1
Re: NSNumberFormatter negative and NSWindowsLatin1
- Subject: Re: NSNumberFormatter negative and NSWindowsLatin1
- From: Jens Alfke <email@hidden>
- Date: Thu, 07 Aug 2014 14:02:13 -0700
> On Aug 7, 2014, at 1:28 PM, Peter Edberg <email@hidden> wrote:
>
> This is intentional. The character is ‘−’ U+2212 MINUS SIGN with UTF-8 representation 0xE2 0x88 0x92. Many locales prefer the proper Unicode minus sign for negative numbers, instead of using U+002D HYPHEN-MINUS.
Yup, this is typographically more correct.
> Seems like the bug here is trying to save the file as WindowsLatin1.
Enabling lossy conversion might help; it might be smart enough to convert this character into a hyphen.
- (NSData *)dataUsingEncoding:(NSStringEncoding)encoding allowLossyConversion:(BOOL)lossy;
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden