Since iOS 7.1 (including iOS 8) negative currency values for locale en_US are no more surrounded by brackets.

Originator:matthias.hochgatterer
Number:rdar://17777788 Date Originated:23-Jul-2014
Status:Duplicate Resolved:
Product:iOS Product Version:
Classification:Other Bugs Reproducible:Always
 
Summary:
In iOS 7 negative currency values for the locale en_US are surround by brackets, as it should be for financial negative values. See http://ux.stackexchange.com/a/1875

Since iOS 7.1 (including iOS 8) this has changed and negative values are not surrounded anymore by brackets.

If this is the indented behaviour (what I do not believe), if would be nice to have it stated somewhere in the release notes.

Steps to Reproduce:
1. Create a NSNumberFormatter for currency style

NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
formatter.numberStyle = NSNumberFormatterCurrencyStyle;

2. Set the locale to be en_US

formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US"];

3. Create a string from a negative value

NSString *string = [formatter stringFromNumber:@(-20.10)];

Expected Results:
The variable `string` should be @"($20.10)"

Actual Results:
On iOS 7.1 and higher the string is @"-$20.10"


Version:
iOS 7.1

Notes:
Run the attached Xcode project on iOS 7.0 and iOS 7.1/8.0 beta 4 and see the printed string for locale "en_US" and you will see the differences.

I've also attached the app output in txt files for iOS 7.0, 7.1 and 8.0

Configuration:
Simulator and iPhone 5NumberFormatter.zip - configuration file has been successfully uploaded.

Attachments:
'NumberFormatter.zip' was successfully uploaded.

Comments

Duplicate of 18080751

By matthias.hochgatterer at Jan. 18, 2015, 10:56 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!