Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.

Encoding issue fix #63

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Encoding issue fix #63

merged 1 commit into from
Jan 14, 2017

Conversation

AdmiringWorm
Copy link
Contributor

@AdmiringWorm AdmiringWorm commented Jan 14, 2017

When a file is encoded with UTF8 without BOM this file is
then detected as ANSI encoded. This fix forces detection of UTF8,
and forces writing powershell scripts as UTF8 with BOM while
using UTF8 without BOM for everything else

/cc @majkinetor

When a file is encoded with UTF8 without BOM this file is
then detected as ANSI encoded. This fix forces detection of UTF8,
and forces writing powershell scripts as UTF8 with BOM while
using UTF8 without BOM for everything else
@majkinetor
Copy link
Owner

How that relates to #60 ?

@AdmiringWorm
Copy link
Contributor Author

It do relate with it, with this it also makes sure that when you replace something in au_SearchReplace it will still be encoded as UTF-8 without BOM.

Don't know why -Encoding UTF8 was removed from that PR though, as it is needed to detect UTF-8 encoding when no BOM isn't used.

@AdmiringWorm
Copy link
Contributor Author

@majkinetor do give an example to what currently happens when AU is run, see the following commit:
chocolatey-community/chocolatey-packages@268af40

basically unicode characters are converted because it's read as ANSI instead of UTF-8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants