Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15573] Decimal(string:locale) on non-Apple platform when locale == nil behavior do not match Apple Foundation #3189

Open
mattyoung opened this issue Dec 9, 2021 · 0 comments

Comments

@mattyoung
Copy link

Previous ID SR-15573
Radar None
Original Reporter @mattyoung
Type Bug
Environment

I don't have any non-Apple platform to verify this. I only look at the source at https://github.com/apple/swift-corelibs-foundation/blob/main/Sources/Foundation/Decimal.swift#L264

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 41f970efd4c0807c3291349d817f291b

Issue Description:

In Apple platform, this call, when `locale == nil` (the default) result in "." (period) used, regardless of what the system locale is. However, it looks like in non-Apple platform, it uses the system's default, which could be "." or "," depending on what the system locale is. I'm told non-Apple platform must match Apple platform, so this is a bug.

See https://forums.swift.org/t/why-unable-to-debug-step-into-decimal-string/53938
and https://forums.swift.org/t/how-to-re-create-a-decimal-with-a-string-originally-from-decimal-description-must-be-locale-independent/53871/10

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant