Hi there
The behaviour of using Locale(identifier: "ar")
with NumberFormatter.locale
appears to have changed between iOS 17 and iOS 18.
Is this expected?
Steps to reproduce
import UIKit
func numberFormatter(withlocaleString localeString: String) -> NumberFormatter {
let locale = Locale(identifier: localeString)
let numberFormatter = NumberFormatter()
numberFormatter.locale = locale
return numberFormatter
}
let numbers = 0...9
let localeDigits = numbers
let ar_digits = localeDigits.compactMap {
numberFormatter(withlocaleString: "ar").string(for: $0)?.first
}
print(ar_digits)
Results
The results show:
****
numbering system on iOS 17latn
numbering system on iOS 18.
iOS 17 | ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"] |
iOS 18 | ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |