Skip to content

Docs for std::fmt could mention locale #69681

Closed
@ExpHP

Description

@ExpHP

From this discussion: https://users.rust-lang.org/t/is-f64-to-string-localized/39011

dan5sch:
On this subject: looking into this question, I was surprised how hard it was to get an up-or-down answer from the standard library documentation. Even a detailed page like the module-level documentation for std::fmt doesn't appear to mention the existence of locale-specific conventions and clarify that Rust doesn't vary behavior by locale, when this is a natural question coming from other languages.

ExpHP:
The concept of a "locale" doesn't even exist in Rust. That's an operating system concept, whereas rust is the sort of language that can be used to write operating systems.

At present, even the standard library of Rust (where abstractions over the operating system go) does not expose an interface for working with locales.

dan5sch:
To put my first comment another way: I'm surprised the module documentation doesn't bring up the subject and say what you said directly, when many people like OP will wonder about this.

Yeah, it should probably be mentioned, to give users something to Ctrl+F for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions