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

Revisiting Solution for Accessing Files with Special Reserved Symbols in WinBtrfs #709

Closed
narfa0215 opened this issue Dec 3, 2024 · 1 comment

Comments

@narfa0215
Copy link

narfa0215 commented Dec 3, 2024

I would like to revisit the discussion in #151, as there may be a much simpler solution for handling paths with illegal characters in WSL. Since WSL 17101 (see also microsoft/WSL#1514), paths containing illegal characters are re-encoded using private Unicode characters (for example, the colon : becomes 0xf03a). This behavior also applies to WinBtrfs, so a possible solution could be to add support for reversing this mapping, which would enable handling these paths correctly.

This approach has already been implemented in other projects, such as Cygwin, which handles similar issues with special symbols. You can find the relevant Cygwin commit source code here: Cygwin commit. Additionally, the latest implementation of this solution in Cygwin can be found in the file strfuncs.cc.
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
cygwin/cygwin@9fa1c64
https://github.com/cygwin/cygwin/blob/main/winsup/cygwin/strfuncs.cc

I propose that this solution be considered for inclusion in WinBtrfs, as it would simplify the handling of paths with special reserved symbols.

@maharmstone
Copy link
Owner

Yes, this is one of the approaches I've considered for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants