Skip to content

.NET 9 iOS / HybridGlobalization: currency symbols / currency names not available #108958

@tipa

Description

@tipa

Description

With .NET 9, the current currency symbol / currency code are not available any more / replaced by the generic currency symbol

Reproduction Steps

  • dotnet new ios
  • use code below

Expected behavior

var a = RegionInfo.CurrentRegion.CurrencyEnglishName; // USD
var b = RegionInfo.CurrentRegion.ISOCurrencySymbol; // USD
var c = RegionInfo.CurrentRegion.CurrencyNativeName; // USD
var d = RegionInfo.CurrentRegion.CurrencySymbol; // $
var e = CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol; // $

Actual behavior

var a = RegionInfo.CurrentRegion.CurrencyEnglishName; // empty string
var b = RegionInfo.CurrentRegion.ISOCurrencySymbol; // empty string
var c = RegionInfo.CurrentRegion.CurrencyNativeName; // empty string
var d = RegionInfo.CurrentRegion.CurrencySymbol; // ¤
var e = CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol; // ¤

Regression?

Yes, it worked in .NET 8, even with HybridGlobalization=true

Known Workarounds

I can just use the iOS methods NSLocale.CurrentLocale.CurrencySymbol or NSLocale.CurrentLocale.CurrencyCode

Configuration

.NET 9 RC2
iPhone SE 2 (system language German)

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions