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

Non-ASCII characters get automatically replaced with other ones #10336

Closed
adrians opened this issue Aug 9, 2016 · 3 comments
Closed

Non-ASCII characters get automatically replaced with other ones #10336

adrians opened this issue Aug 9, 2016 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster
Milestone

Comments

@adrians
Copy link

adrians commented Aug 9, 2016

Sometimes, when I open a file, then save that file and close it, certain (non-ASCII) characters get replaced with other ones, and this causes problems. It's not a serious issue, but it's annoying.

To reproduce, create a file which contains only the "0x93" byte. Open it with VS Code, don't do any change to it, save it, close the editor and hexdump it. After saving it the file contains "0xEF 0xBF 0xBD".

Details:

  • VSCode Version: 1.4.0
  • OS Version: Windows 7
@bpasero
Copy link
Member

bpasero commented Aug 9, 2016

@adrians Looks like an issue with the encoding. If you do not configure your encoding we save as UTF-8 which ends up using 3 bytes.

This should be OK once you change the encoding to the right one for your characters.

@bpasero bpasero added the info-needed Issue requires more information from poster label Aug 9, 2016
@bpasero bpasero added this to the Backlog milestone Aug 9, 2016
@adrians
Copy link
Author

adrians commented Aug 9, 2016

You are right, the encoding was causing the issue.

To work on the project I've added "files.encoding": "windows-1252" to my settings and now it's running fine. The fact that it doesn't auto-detect the encoding or at least warn me that it's about to change the file's encoding is still strange, but shouldn't impact me now.

Thanks for the help.

@adrians
Copy link
Author

adrians commented Aug 9, 2016

It looks like a duplicate of #7048 so we can close it.

@adrians adrians closed this as completed Aug 9, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants