You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 diskUTF-8 with BOM
: we add the UTF-8 BOM because the user explicitly asked for itUTF-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 fileUTF-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 fileThis logic could go into the encoding helper we already have if possible.
The text was updated successfully, but these errors were encountered: