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

Git merge doesn't understand UTF16 and that's what PSD1 files are created as. #745

Closed
andrewducker opened this issue May 15, 2017 · 2 comments

Comments

@andrewducker
Copy link

System Details

1.12.1
f6868fce3eeb16663840eb82123369dec6077a9b

Major Minor Build Revision


1 0 0 0

[email protected]

Name Value


PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2

Issue Description

Git comparisons of PSD1 files show nonsense characters. I believe this is because PSD1 files are automatically generated as UTF-16 LE, and Git doesn't recognise this as a text format.
If VSCode is going to be the default tool for editing Powershell files then it should be able to diff powershell module files.

Attached Logs

image

@rkeithhill
Copy link
Contributor

rkeithhill commented May 15, 2017

I suggest you file this issue on https://GitHub.com/powershell/powershell since that is where the New-ModuleManifest command is implemented. Also, if you use the PowerShell extension command to create a new module template, it will create the PSD1 file using UTF8. :-)

Another option is to file a bug against VSCode (https://github.com/microsoft/vscode) asking for better diff support of UTF-16 LE files.

@andrewducker
Copy link
Author

Thanks.

Raised PowerShell/PowerShell#3789 and microsoft/vscode#26722

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

No branches or pull requests

2 participants