Hello
since i cannot reopen old topic, i have to start new one.
i updated my Windows OS to latest build, and now i have same issue as described here in topic here :
Error: Unsupported file encoding (Unicode Big Endian)
I changed to every possible encoding, however i still end up with same result.
Issue happens for all WinForms, old or new.
------ Build started: ChildTest, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Windows Forms) x64
Adding C:\Users\Daniel\OneDrive\SAPIEN\PowerShell Studio\Projects\RunSpace\ChildTest.Package.ps1
Error: Unsupported file encoding (Unicode Big Endian)
PS Version : 173
Unsupported Encoding when building exe
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- daniel kusnir
- Posts: 75
- Last visit: Tue May 23, 2023 10:50 am
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Unsupported Encoding when building exe
Please check what your default file encoding is in PowerShell Studio.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- daniel kusnir
- Posts: 75
- Last visit: Tue May 23, 2023 10:50 am
Re: Unsupported Encoding when building exe
default is UTF-8-BOM
but i tested every encoding, the result is all the same
but i tested every encoding, the result is all the same
- daniel kusnir
- Posts: 75
- Last visit: Tue May 23, 2023 10:50 am
Re: Unsupported Encoding when building exe
i just reinstalled from 171 to 5.7.175 on different machine, i started to experience same behavior :
Error: Unsupported file encoding (Unicode Big Endian)
this is for all projects that i already built. Default is still UTF-8-BOM
when i create brand new project, packages got compiled, however all other projects are unusable now.
Any idea how to fix that ?
The only output i see is :
------ Build started: ShowTsVar, Configuration: x64 ------
Packaging with SAPIEN PowerShell V2 Host (Windows Forms) x64
Adding C:\Users\Daniel\OneDrive\SAPIEN\PowerShell Studio\Projects\ShowTsVar\Production\White\ShowTsVar.Package.ps1
Error: Unsupported file encoding (Unicode Big Endian)
However i do not see more specific log which form or script is causing the issue. I manually check all, but every script in the project has same encoding
Error: Unsupported file encoding (Unicode Big Endian)
this is for all projects that i already built. Default is still UTF-8-BOM
when i create brand new project, packages got compiled, however all other projects are unusable now.
Any idea how to fix that ?
The only output i see is :
------ Build started: ShowTsVar, Configuration: x64 ------
Packaging with SAPIEN PowerShell V2 Host (Windows Forms) x64
Adding C:\Users\Daniel\OneDrive\SAPIEN\PowerShell Studio\Projects\ShowTsVar\Production\White\ShowTsVar.Package.ps1
Error: Unsupported file encoding (Unicode Big Endian)
However i do not see more specific log which form or script is causing the issue. I manually check all, but every script in the project has same encoding
- daniel kusnir
- Posts: 75
- Last visit: Tue May 23, 2023 10:50 am
Re: Unsupported Encoding when building exe
sorry i made a typo -
1. when i create new multi-form project, i got exactly same issue
2. when i crate new form only, i do not see any issues
1. when i create new multi-form project, i got exactly same issue
2. when i crate new form only, i do not see any issues
Re: Unsupported Encoding when building exe
The default encoding is the encoding used for 'new' script files, it does not change the encoding of existing files. To change the encoding of an existing file, open the file in PowerShell Studio, update the encoding on the status bar (bottom-right corner), and save:
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- daniel kusnir
- Posts: 75
- Last visit: Tue May 23, 2023 10:50 am
Re: Unsupported Encoding when building exe
Encoding for my existing or new projects has not been changed. It is a default as it always been.
I tried to change it and tested all options you have, however the result is still the same. Is there a way to get some verbose log where exactly is the issue ? i tested 2 PCs, both have same issue when updated to 175
I tried to change it and tested all options you have, however the result is still the same. Is there a way to get some verbose log where exactly is the issue ? i tested 2 PCs, both have same issue when updated to 175
- daniel kusnir
- Posts: 75
- Last visit: Tue May 23, 2023 10:50 am
Re: Unsupported Encoding when building exe
All right i solved the issue. Microsoft posted here: https://docs.microsoft.com/en-us/powers ... wershell-7
a little code to re-encode ps1 file. So i had ran the script and it fixed my issue. All my projects are compilable again and
i can use latest version at last.
a little code to re-encode ps1 file. So i had ran the script and it fixed my issue. All my projects are compilable again and
i can use latest version at last.
- $path = cd "my path to the script directory"
- Get-ChildItem *.ps1 -Recurse | ForEach-Object {
- $content = Get-Content -Path $_
- Set-Content -Path $_.Fullname -Value $content -Encoding UTF8 -PassThru -Force
- }