Skip to content

scala-cli setup-ide generates files in latin-1 instead of utf-8 #2598

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

Closed
JD557 opened this issue Nov 30, 2023 · 2 comments · Fixed by #2599
Closed

scala-cli setup-ide generates files in latin-1 instead of utf-8 #2598

JD557 opened this issue Nov 30, 2023 · 2 comments · Fixed by #2599
Labels
bug Something isn't working

Comments

@JD557
Copy link
Contributor

JD557 commented Nov 30, 2023

Version(s)
v1.1.0

Describe the bug

scala-cli setup-ide generates .bsp/scala-cli.json in latin-1, while it should be encoded in UTF-8 (I was unable to check the other files).
This breaks the integration with metals for users with a home on a non-ASCII path.

To Reproduce

  • Set your scala-cli instalation directory to somewhere with a non-ASCII character (in my case: C:\Users\João\AppData\Local\Coursier\data\bin\.scala-cli.aux.exe)
  • Run scala-cli setup-ide
  • Check the .bsp/scala-cli.json file (in my case, the ã was encoded as 0xe3)

Expected behaviour

I would expect the file to be encoded in UTF-8.

In my case, I would expect the ã to be encoded as either 0xc3 0xa3 (LATIN SMALL LETTER A WITH TILDE) or 0x61 0xcc 0x83 (LATIN SMALL LETTER A with COMBINING TILDE).

scala-cli setup-ide . --charset utf-8 seems to do the trick. I would expect this to be the default, as metals won't work otherwise.

@JD557 JD557 added the bug Something isn't working label Nov 30, 2023
@JD557
Copy link
Contributor Author

JD557 commented Nov 30, 2023

@SethTisue
Copy link
Contributor

nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants