`Decimal.FormatStyle` does not always respect the locale's decimalSeparator
Description
Decimal.FormatStyle does not always respect the locale's decimalSeparator, also, the same error occurs with FloatingPointFormatStyle
Steps to reproduce 1- Set the iPhone region to Germany. 2- Set the iPhone language to English (US). 3- Set the Number Format decimal separator to period instead of the default comma.
Expected behavior
let number: Decimal = 1.5
let newFormatter = Decimal.FormatStyle.number
let newResult = number.formatted(newFormatter) // 1,5 ❌
let oldFormatter = NumberFormatter()
oldFormatter.numberStyle = .decimal
let oldResult = oldFormatter.string(from: number as NSNumber)! // 1.5 ✅

Environment
- Swift version: 5.7
- Xcode version: 14.2
- Deployment target: iOS 16.3
feedback: FB11980066
cc @parkera
@hamishknight Sorry to bother you with this. Could you transfer this too?
Sure
We're blocked by ICU to be able to support this unfortunately
Apologies for my ignorance, how that is the case if NumberFormatter is able to format it correctly?
Apologies for my ignorance, how that is the case if
NumberFormatteris able to format it correctly?
NumberFormatter uses a legacy ICU API, where we've moved onto a modern one for Decimal.FormatStyle
Hiya, is there any progress on this? I feel like this is a pretty bug bug because we cannot format decimals into the users preferred format and worse still we cannot parse from a user typed string into a decimal?