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

Remote: Preserve BOM in UTF-8 when found #48826

Closed
4 tasks done
bpasero opened this issue Apr 27, 2018 · 1 comment
Closed
4 tasks done

Remote: Preserve BOM in UTF-8 when found #48826

bpasero opened this issue Apr 27, 2018 · 1 comment
Assignees
Labels
debt Code quality issues on-testplan remote Remote system operations issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Apr 27, 2018

The contract basically is, depending on what encoding is picked to save a file:

  • UTF-8: we do not automatically add a UTF-8 BOM unless the file has a BOM on disk
  • UTF-8 with BOM: we add the UTF-8 BOM because the user explicitly asked for it
  • UTF-16 LE: we always add a UTF-16 BOM because this makes it easier for us to not falsely think the file is binary due to 0-bytes within the file
  • UTF-16 BE: we always add a UTF-16 BOM because this makes it easier for us to not falsely think the file is binary due to 0-bytes within the file

This logic could go into the encoding helper we already have if possible.

@bpasero bpasero self-assigned this Apr 27, 2018
@bpasero bpasero added debt Code quality issues remote Remote system operations issues labels Apr 27, 2018
@bpasero bpasero added this to the May 2018 milestone Apr 27, 2018
@bpasero bpasero changed the title Preserve BOM handing for encoding for remote resources Proper BOM handing for encoding for remote resources Apr 27, 2018
@bpasero bpasero modified the milestones: May 2018, June 2018 May 18, 2018
@bpasero bpasero removed this from the June 2018 milestone Jun 3, 2018
@bpasero
Copy link
Member Author

bpasero commented Mar 12, 2019

I pushed a change for the easy cases (f50c390). There is still the remaining (more tricky) one to actually preserve the BOM when it is already there for UTF-8 only.

@bpasero bpasero changed the title Proper BOM handing for encoding for remote resources Remote: Preserve BOM in UTF-8 when found Mar 12, 2019
@bpasero bpasero added this to the On Deck milestone Mar 12, 2019
@bpasero bpasero modified the milestones: On Deck, April 2019 Mar 27, 2019
@bpasero bpasero closed this as completed Apr 16, 2019
@bpasero bpasero added verification-needed Verification of issue is requested and removed verification-needed Verification of issue is requested labels Apr 17, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues on-testplan remote Remote system operations issues
Projects
None yet
Development

No branches or pull requests

1 participant