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

Tracking Issue for windows_case_insensitive #86007

Open
CDirkx opened this issue Jun 4, 2021 · 3 comments
Open

Tracking Issue for windows_case_insensitive #86007

CDirkx opened this issue Jun 4, 2021 · 3 comments
Labels
A-FFI Area: Foreign function interface (FFI) A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC O-windows Operating system: Windows T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@CDirkx
Copy link
Contributor

CDirkx commented Jun 4, 2021

This is a tracking issue for dealing with strings on Windows that are defined to be case-insensitive: environment variable keys, registry keys, file paths, resource handle names etc.
The feature gate for the issue is windows_case_insensitive.

Unresolved Questions

What is the API std should offer to deal with Windows specific case-insensitive comparisons?

Implementation history

@CDirkx CDirkx added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Jun 4, 2021
@ChrisDenton
Copy link
Member

I've been thinking about this recently. Filesystem paths are particularly tricky because they handle case insensitivity differently from the rest. On NTFS, case folding is stored in a $UpCase file, so it can differ per drive. Also case sensitivity can be turned off per directory.

For the rest, perhaps as a start, adding a function to OsStrExt that uses the OS function to do case insensitive comparisons? Or at least a compare function that somehow allows specifying case behaviour?

@CDirkx
Copy link
Contributor Author

CDirkx commented Jun 4, 2021

Yeah that was my plan, add system_cmp and system_eq to os::windows::OsStrExt as a start (#86008). Not sure what we should say there about the file system paths though.

@inquisitivecrystal
Copy link
Contributor

@rustbot label +A-ffi +O-windows +T-libs

@rustbot rustbot added A-FFI Area: Foreign function interface (FFI) O-windows Operating system: Windows T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jun 5, 2021
@workingjubilee workingjubilee added the A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` label Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-FFI Area: Foreign function interface (FFI) A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC O-windows Operating system: Windows T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants