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

Unicode path handling not working on Windows #2920

Open
thistle-witch opened this issue Jan 14, 2024 · 2 comments · May be fixed by #2921
Open

Unicode path handling not working on Windows #2920

thistle-witch opened this issue Jan 14, 2024 · 2 comments · May be fixed by #2921
Assignees
Labels
A-lsp Area: LSP, assists and code completion A-unicode Area: unicode 'character' support C-bug Category: bug - something isn't working as it's supposed to P-windows This issue affects Windows users

Comments

@thistle-witch
Copy link

Lapce Version

nightly-9bddebd

System information

Windows 11

Describe the bug

Error paths reported through the LSP have escaped HTML characters if the original path has non-ascii characters. This causes incorrect error navigation.

Additional information

Path reported in error should be C:/Users/þistle/bincode/src

image

My best guess is that the LSP requires HTML escaping of paths and lapce needs to unescape them.

@thistle-witch thistle-witch added the C-bug Category: bug - something isn't working as it's supposed to label Jan 14, 2024
@panekj panekj self-assigned this Jan 14, 2024
@panekj panekj added P-windows This issue affects Windows users A-lsp Area: LSP, assists and code completion A-unicode Area: unicode 'character' support labels Jan 14, 2024
@thistle-witch
Copy link
Author

This is the section of the LSP that specifies how to handle URI resources: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#uri

Handling this properly should just be a matter of properly escaping and unescaping the URIs. the url crate should suffice.

@thistle-witch
Copy link
Author

Error is on this line

let path = url.path();

path() returns the percent-encoded ascii path, not the unescaped path.

@thistle-witch thistle-witch linked a pull request Jan 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lsp Area: LSP, assists and code completion A-unicode Area: unicode 'character' support C-bug Category: bug - something isn't working as it's supposed to P-windows This issue affects Windows users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants